Adding an attribute on article class makes eZ publish fail!

Author Message

K259

Thursday 07 July 2005 3:04:32 am

I was going to add an attribute to the article class. We got about 13.000 articles in the database, and when i add this attribute in the admin-interface then eZ publish isn't able to do this operation. eZ publish fails this task.

Does anyone know how I can create this attribute with a script or make this work in another way?

L.

Mikael Johansson

Thursday 07 July 2005 3:20:03 am

Adding attributes works for me.

What kind of error du you get?

I would try to clear the caches for the admin interface, sometimes the caches get you into trouble when modifying classes.

Mikael Johansson, Sweden

K259

Thursday 07 July 2005 3:31:56 am

eZ publish processes and you can see on the statusbar in the browser that ez is working, but it hangs after a while..I check some articles, Some articles have got this new attribute available, but not all.

Mikael Johansson

Thursday 07 July 2005 3:42:53 am

Maybe it is updating the database so that all articles get an empty value for the attribute?

Try to extend the timeout (showld be in your vhosts file I think) and let it process?

Mikael Johansson, Sweden

K259

Thursday 07 July 2005 4:15:07 am

Nope. The eZ team mentioned that I need to write a script to be able to add a new attribute on a class if there are a lot of objects of this article class in the database. Because it's to heavy to process this through the admin-interface when there's thousands of objects in the db.

K259

Friday 08 July 2005 1:54:34 am

No tip?

Frederik Holljen

Friday 08 July 2005 2:14:27 am

As long as the process doesn't time out when you run it through your browser you should be ok. We have a script internaly that we use for this that I think you can use as a starting point. I'll ask someone who has it.

K259

Friday 08 July 2005 4:34:44 am

Great :)

Can you post a comment here when you have uploaded it?

Frederik Holljen

Friday 08 July 2005 5:27:34 am

The great Ole just uploaded it as a contribution. Use at your own risk though :)

http://ez.no/community/contribs/hacks/update_class_from_command_line

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 03:32:20
Script start
Timing: Jan 19 2025 03:32:20
Module start 'layout'
Timing: Jan 19 2025 03:32:20
Module start 'content'
Timing: Jan 19 2025 03:32:20
Module end 'content'
Timing: Jan 19 2025 03:32:20
Script end

Main resources:

Total runtime0.0154 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.4141152.6563
Module start 'layout' 0.00590.0030 742.070339.5078
Module start 'content' 0.00890.0046 781.578197.3047
Module end 'content' 0.01340.0019 878.882838.3047
Script end 0.0154  917.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002315.0127140.0002
Check MTime0.00116.9690140.0001
Mysql Total
Database connection0.00127.847310.0012
Mysqli_queries0.002717.335230.0009
Looping result0.00000.097410.0000
Template Total0.001610.310.0016
Template load0.00085.351610.0008
Template processing0.00084.883110.0008
Override
Cache load0.00053.236310.0005
General
dbfile0.00031.631380.0000
String conversion0.00000.060340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs