Forums / Developer / Fatal error in Back Office : copysubtree.php on line 729

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Fatal error in Back Office : copysubtree.php on line 729

Author Message

Sébastien Morel

Tuesday 06 March 2007 3:14:42 am

Hi,

Can you give your opinion about my fix for the bug explain here :
http://issues.ez.no/IssueView.php?Id=10388

Thanks

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Sébastien Morel

Wednesday 07 March 2007 2:11:29 am

I would just know if this fix will not generate another problem

copysubtree.php around the line 729 :

  $relatedNodeID = $relationItem->attributeValue('node-id');
  $relatedNode = eZContentObjectTreeNode::fetch( $relatedNodeID );
  $originalObjectID = $relatedNode->attribute('contentobject_id');

The error appends when the $relationItem->attributeValue('node-id') is empty so I have add a condition:

if ($relationItem->attributeValue('node-id')>0)
{
  $relatedNodeID = $relationItem->attributeValue('node-id');
  $relatedNode = eZContentObjectTreeNode::fetch( $relatedNodeID );
  $originalObjectID = $relatedNode->attribute('contentobject_id');
}else 
  $originalObjectID = $relationItem->attributeValue('contentobject-id');

Anybody ?

Thanks

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)