Author Topic

Paul Forsyth

Wednesday 30 June 2004 11:23:58 am

Comment41037

You might need to store the version, eg:

      // Set a status for the content object version
      $version =& $contentObject->version($contentObject->attribute( 'current_version' ) );
      $version->setAttribute( 'status', EZ_VERSION_STATUS_DRAFT);
      $version->store();

Plus at the end try this:

$operationResult = eZOperationHandler::execute( 'content', 
                                                'publish', 
                                                array( 'object_id' => $contentObject->attribute( 'id' ), 
                                                       'version' => $contentObject->attribute('current_version' ) ) );

for good measure.

paul

--
http://www.visionwt.com