Forums / Developer / contentobject status 5 / Comment47279
Claudia Kosny
Thursday 09 November 2006 2:37:48 am
Hi Paul
here is the result of print_r($currentVersion):
ezcontentobjectversion Object ( [PersistentDataDirty] => [CurrentLanguage] => [ContentObjectAttributeArray] => [DataMap] => [TempNode] => [VersionName] => [VersionNameCache] => Array ( ) [ID] => 738 [ContentObjectID] => 201 [CreatorID] => 14 [Version] => 5 [Status] => 5 [Created] => 1163067858 [Modified] => 1163067858 [WorkflowEventPos] => 0 [UserID] => 0 [LanguageMask] => 3 [InitialLanguageID] => 2 )
As you can see I get a contentobjectversion as it should be.The object and the version itself is also correct, I can access the current content of all attributes correctly.
I get similar data for the current version if I fetch all versions of the object using contentobject->versions(false) and then check the data for the version that is currently edited.
Maybe a draft is only a draft with status 0 if it was stored as draft and the status 5 is simply for a toally new version? I have not checked any further as I spent already a considerable amount of time finding out why my code did not work as expected.At the moment my code works fine if I check for status equals 5 or 0 so I will leave it at that for now (unless you can point me to a better solution)
Regards
Claudia