Forums / General / Help changing the parent node of an object.

Help changing the parent node of an object.

Author Message

Tamaki Hodge

Tuesday 08 August 2006 8:42:30 pm

I recently upgraded a large intranet based on eZpublish from version 3.4 to version 3.8.

However I have noticed one key feature no longer works.

When I edit an existing item I can no longer change the parent node of the item. To do this I set the SetPlacementNodeIDArray[] and MainNodeID to the nodeid of the new parent node.

E.g.
<input type="hidden"
name="SetPlacementNodeIDArray[]"
value="{$newparentnodeid}" />

<input type="hidden"
name="MainNodeID"
value="{$newparentnodeid}" />

These fields work when I am creating a new object, however they don't seem to work when editing an existing item.

Can someone please confirm weather or not they use similar code in their edit templates and weather it works in eZpublish 3.8?

Kristof Coomans

Tuesday 08 August 2006 10:34:55 pm

Welcome to the eZ community!

This could be related to http://ez.no/bugs/view/8438 , but I'm not sure. Please try the attached patch and tell us if it works now.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Tamaki Hodge

Wednesday 09 August 2006 3:21:14 pm

Thanks for the suggestion.

I applied the patch, however I still have the same problem.

Any ideas?

Kristof Coomans

Wednesday 09 August 2006 10:26:48 pm

In kernel/content/node_edit.php, on line 251:

// If the object has been previously published we do not allow node assignment operations
if ( $object->attribute( 'status' ) != EZ_CONTENT_OBJECT_STATUS_DRAFT )
{
    return;
}

I'm afraid it's the expected behavior. The code came in together with the new multilingual features on trunk svn rev. 15370.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Tamaki Hodge

Thursday 10 August 2006 3:22:20 pm

Thanks.

Would it be a good idea to remove this if statement?

Or should I just write an extension that takes care of it?