Forums / Developer / Adding an attribute on article class makes eZ publish fail!

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

eZ debug

Timing: Jan 31 2025 04:17:09
Script start
Timing: Jan 31 2025 04:17:09
Module start 'content'
Timing: Jan 31 2025 04:17:09
Module end 'content'
Timing: Jan 31 2025 04:17:09
Script end

Main resources:

Total runtime0.1273 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1875180.7969
Module start 'content' 0.00550.0042 768.9844101.8828
Module end 'content' 0.00970.1176 870.8672530.1719
Script end 0.1273  1,401.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.5558200.0002
Check MTime0.00141.1234200.0001
Mysql Total
Database connection0.00070.572710.0007
Mysqli_queries0.084466.31781410.0006
Looping result0.00100.75941390.0000
Template Total0.117392.110.1173
Template load0.00080.599210.0008
Template processing0.116591.535310.1165
Override
Cache load0.00060.439910.0006
Sytem overhead
Fetch class attribute can translate value0.00070.530110.0007
XML
Image XML parsing0.00030.237310.0003
General
dbfile0.00856.6855200.0004
String conversion0.00000.003230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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