Forums / Developer / Conflicts with updateniceurls.php and flatten.php

Conflicts with updateniceurls.php and flatten.php

Author Message

Erik Weinmaster

Thursday 13 January 2011 11:09:57 am

Hello,

I'm trying to clean up my company's ezpublish database. So after I recommended updateniceurls.php and flatten.php (which solves some of the problems we're facing), the biggest concern was "What happens to objects that are being edited/published with either of these scripts are in the middle of running?"

Perhaps a better question would be, can I run these scripts on a production database where people are constantly working? Are there any conflicts if an object is flattened or its friendly url is updated while someone is editing it?

Thanks,

-erik

Bertrand Dunogier

Thursday 13 January 2011 4:14:45 pm

This is actually a very good question... the short answer is no.

One example: flatten calls eZContentObjectVersion::removeVersions(). This method removes every temporary version (drafts, internal drafts, rejects, etc). This is a problem for internal drafts, as they might be used.

However, the method has an expiry parameter. It should be set to a sane value (maybe we have such an editing timeout already ?).

I haven't checked the other calls yet.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier