Forums / Developer / publish an unpublished article using php
Sebastian Sprenger
Wednesday 04 February 2004 12:48:42 am
Hi all, I try to publish an object via php. Using a workflow I unpublish it ($myObject->unpublish()).Later I use another script to publish it:
$operationResult = eZOperationHandler::execute( 'content', 'publish', array('object_id' => $objectId, 'version' => $aktVersion->Attribute("version") ) );
My problem: it works, but only after a reload of the page! First time, $operationResult returns the value 1, but the object is not published. Second time ist says 1 again, but the object is published now...
Thanks for any suggestions, Sebastian