Forums / Developer / Unable to delete node because of too many sub nodes
Eirik Alfstad Johansen
Tuesday 10 October 2006 10:43:28 am
Hi,
I recently stumbled across a message (in v. 3.8.4) I've never seen before while trying to delete a node. Here it is, freely translated from Norwegian:
[quote]Warnings:
The lines that are marked with red contain more than the maximum amount of nodes that can be removed this way. They will not be removed. You can remove them using the script "Subtree Remove".[/quote]
I've never heard of such a script, and I'm unable to locate any information about it (and the ez.no search being unavailable doesn't help).
Does anyone know anything about this script?
Thanks in advance !
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Łukasz Serwatka
Tuesday 10 October 2006 10:52:27 am
Hi Eirik,
This script is placed under bin/php/ezsubtreeremove.php and takes 2 parameters.
Options: --nodes-id=VALUE Subtree nodes ID (separated by comma ','). --ignore-trash Ignore trash ('move to trash' by default).
Execute it from root node.
php bin/php/ezsubtreeremove.php
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Kristof Coomans
Tuesday 10 October 2006 10:59:13 am
It's in a doc for eZ 3.9: http://pubsvn.ez.no/nextgen/trunk/doc/features/3.9/ezsubtreeremove_script.txt
The changelog of 3.8.4 (<i>http://ez.no/download/ez_publish/changelogs/ez_publish_3_8/changelog_3_8_3_to_3_8_4</i>) mentions some related INI setting:<i>Added content.ini[RemoveSettings].MaxNodesRemoveSubtree Maximum number of nodes to remove (using Remove Subtrees feature)</i>, so I guess it was added in this 3.8 release.
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
Tuesday 10 October 2006 11:02:29 am
Hi guys,
Thanks for your prompt response. After doing some additional searching, I came across this bug report which explained the problem:
http://ez.no/de/community/bugs/remove_many_objects_does_not_work_correctly
However, the script is not available withj the 3.8.4 distro (not mine, at least), so I had to add it manually.
Thanks anyway !
Wednesday 01 November 2006 1:08:49 am
My fresh 3.8.6 install misses it too.
I'll report this as a bug ( http://issues.ez.no/IssueView.php?Id=9313 ).
Thanks for noticing!
Vytautas Germanavičius
Thursday 02 November 2006 10:25:23 am
i think , in this case deleting should be done directly in database, because deleting, when you need to create ph objects, to make thousands of queries takes a lot of time. Any extension which i try, and which is using ez php framework - gives me timeout...
For example, i need to delete 22 000 nodes. No extenstion at the moment can do this. With PHP - forget about it...
{set-block scope=root variable=cache_ttl}0{/set-block}