Friday 30 May 2008 12:04:09 pm
Hi I feel I'm missing the point somewhere ... I have a published object in one language. I want to add attributes in another language. The object doesn't have attributes for this other language yet, so I create a new version - I rather wouldn't, but it's a safe way to go.
So taking the code from here http://ezpedia.org/wiki/en/ez/creating_new_content_object_versions_with_php
$newVersion =& $object->createNewVersion();
$result = eZOperationHandler::execute( 'content', 'publish', array(
'object_id' => $object->attribute( 'id' ),
'version' => $newVersion->attribute( 'version' )
) );
That works. However, if I do
$newVersion =& $object->createNewVersion($orgversionnr);
$result = eZOperationHandler::execute( 'content', 'publish', array(
'object_id' => $object->attribute( 'id' ),
'version' => $newVersion->attribute( 'version' ) )
);
I get 2 published versions, with all attributes appearing twice in each ?? What I obviously want to do, is
$newVersion =& $object->createNewVersion($orgversionnr,true,$newlocale,$orglocale);
But that makes the mess even bigger - two published objects, each in one language, with all the attributes doubled. Is this a bug, or am I poking at the wrong method ?
confused, *-pike
---------------
The class eZContentObjectTreeNode does.
|