Forums / Developer / Inserting article through code problem / Comment41037
Paul Forsyth
Wednesday 30 June 2004 11:23:58 am
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