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
|