Author Topic

Dmytro Tomilovskiy

Tuesday 06 June 2006 8:31:17 am

Comment46094

Greetings, Charly.

I am currently working with 3.7, so things might be a little different for you. However this is the code that I am using to get the attributes of the content object that is being published:

include_once( 'kernel/classes/ezcontentobject.php' );

$processParams = unserialize( $process->Parameters );
$object_id = $processParams['object_id'];
$object = eZContentObject::fetch($object_id);

$contentObjectAttributes =& $object->contentObjectAttributes();

foreach ($contentObjectAttributes as $contentObjectAttribute)
{
var_export( $contentObjectAttribute, TRUE )
}

Notice that I am using $object_id variable instead of a fixed value 1. The error you are getting is probably caused by the fact that there is no object in your system with ID 1.

Thank you for your time.