eZ Community » Forums » General » Is my class definition broken?
expandshrink

Is my class definition broken?

Is my class definition broken?

Monday 09 January 2012 3:56:37 pm - 4 replies

We´re having a strange problem with a custom datatype we've created. I guess its not the datatype as it seems to work very well, except for this one class definition.

When adding this type as an attribute to any content class everything works fine, but I have one class that ends up in a "Maximum execution time" timeout on saving the new definition.

"/path/to/site/kernel/classes/ezpersistentobject.php on line 886"

It seems very strange and I´m wondering if any of you could point me in the right direction for debugging. Any "cleanup-scripts" for class definitions that I need to know about?

I appreciate any help!

Monday 09 January 2012 5:01:04 pm

Are you adding the attribute to a class with a lot of objects?  If so, you might have to temporarily increase your timeout or add the attribute via the command line using an extension such as this:

https://github.com/ezsystems/ezxmlinstaller

Or code snippets such as those mentioned here:

http://share.ez.no/forums/developer/is-it-possible-to-add-new-attributes-to-an-existing-class-programmatically

Monday 09 January 2012 6:09:33 pm

I think Peter is right.

You can also use ezscriptmonitor so that you can defer content class/object update to a cronjob. This way you will avoid timeout and the operation will be done faster.

Monday 09 January 2012 8:24:04 pm

Thanks guys. Thats probably it. Will try it out right away...

Monday 09 January 2012 9:53:53 pm

Are you adding the attribute to a class with a lot of objects?  If so, you might have to temporarily increase your timeout or add the attribute via the command line using an extension such as this:

https://github.com/ezsystems/ezxmlinstaller

Or code snippets such as those mentioned here:

http://share.ez.no/forums/developer/is-it-possible-to-add-new-attributes-to-an-existing-class-programmatically

Thanks. You put me in the right direction happy.gif Emoticon Pretty new with eZ so a lot of questions to work out happy.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu