Thursday 16 February 2012 7:42:55 pm - 9 replies
The trash is great: it just happens that you will accidentally delete an item, and you can simply recover and place it in the original location. This works well if you deleted a single item, but If the item you deleted has many sub items, this becomes cumbersome. A long time ago this issue had been raised, but so far no solution has been created.
As it recently happened that I had to restore a large number of items from a sub tree from the trash, I created this script. Given a node ID, it restores the node itself and all items from the trash that are sub items (to any depth) from this node.
Saturday 18 February 2012 1:09:13 am
I think theres a bug, should be:
$location = eZNodeAssignment::fetch( $object->ID, $version->Version, $parentNodeID );
Otherwise thanks! Just what i needed right now! Silly users, deleting stuff left and right
Double-checked, but I don't see a difference with the given code, do I overlook something?
Thursday 19 April 2012 12:40:52 pm
I'm currently in the situation where I'm trying to restore a subtree, but the top node of this tree cannot be restored at the original location. Where do I find the original node_id that I should enter in the --restore-id parameter of the script? Afaik an item in the trash has no node_id anymore. Or am I missing something?
Thursday 19 April 2012 12:48:28 pm
Quote from Sander van den Akker :I'm currently in the situation where I'm trying to restore a subtree, but the top node of this tree cannot be restored at the original location. Where do I find the original node_id that I should enter in the --restore-id parameter of the script? Afaik an item in the trash has no node_id anymore. Or am I missing something?
Hi Sander,
It should be in eznode_assignment table, i think. Have you checked there.
You must be logged in to post messages in this topic!