This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Cleaning object instances number...

Cleaning object instances number after removeThis();

Cleaning object instances number after removeThis();

Tuesday 10 April 2012 11:16:27 pm - 4 replies

Hi there, I made a big mistake will importing datas and removed my errors with :


Nodes hae been well removed but Objects count in classes panel (in administration) still keep them in the sum.

Is there a way to clean thoses objects instances who should not be here ?



Tuesday 10 April 2012 11:55:12 pm


do you mean object which is not link with a node : try the flatten.php script....



Wednesday 11 April 2012 9:48:31 am

I tryed flatten.php but the count hasn't changed... I shold have around 350 objects and the counter is 800+

I don't know if I have to change a static counter in DB or if objects are counted dynamically...

Wednesday 11 April 2012 10:16:39 am


Another Idea is to try removing objects without main_node if this matches your case.

Wednesday 11 April 2012 11:52:52 am

You can create dummy eZContentObjectTreeNode objects and persist them to the database.

Those dummy nodes would wrap your objects which don't have a node, and you can give to all of them a same parent_node_id.

This way, they would show up in content tree under that node and you could delete them through the admin interface.

P.S. As I'm not really sure if this would have any side effects, better backup your database before attempting it happy.gif Emoticon

EDIT: Now that I think about it, there are node assignments (eznode_assignment table) that are probably left over too, and you should make sure that data in eznode_assignment table matches the new data of dummy nodes.

Here is a complete database table dependency for ezcontentobject_tree table, so you can inspect any other leftovers too.

Modified on Wednesday 11 April 2012 12:00:15 pm by Edi Modrić


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

36 542 Users on board!

Forums menu

Proudly Developed with from