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

eZ Community » Forums » Setup & design » MainNodeId not populated
expandshrink

MainNodeId not populated

MainNodeId not populated

Tuesday 22 November 2005 11:14:31 am - 1 reply

Hi,

I have written a very simple cronjob script with the following code :

$objectID = 249;
$object =& eZContentObject::fetch( $objectID );
print_r($object);

To my surprise, the variable MainNodeId of the object does not get populated, and this causes the code that follows to crash. Am I missing an include statement ? Here is the bunch of classes I imported :

include_once( 'kernel/classes/ezworkflowtype.php' );
include_once( 'lib/ezdb/classes/ezdb.php' );
include_once( 'kernel/classes/ezcontentobject.php' );
include_once( 'kernel/classes/ezcontentobjecttreenode.php' );
include_once( 'kernel/classes/ezcontentbrowse.php' );
include_once( 'kernel/classes/ezcontentbrowsebookmark.php' );
include_once( 'kernel/classes/ezcontentclass.php' );
include_once( "lib/ezutils/classes/ezhttptool.php" );
include_once( 'lib/ezdb/classes/ezdb.php' );
include_once( 'lib/ezutils/classes/ezoperationhandler.php' );
include_once( "kernel/classes/ezcontentclassattribute.php" );

Using eZ 3.7.1 and PHP 4.4.0

Thanks

Tuesday 22 November 2005 12:09:46 pm

OK : changing the code to :

$objectID = 249;
$object =& eZContentObject::fetch( $objectID );
$mainNodeID = $object->attribute( 'main_node_id' );
print_r($object);

now populates MainNodeID in the print_r ... bug or feature ?

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from