Details
-
Bug
-
Resolution: Fixed
-
Minor
-
0.9.840
-
None
-
class add properties save object $doc.display()
-
Description
As posted on the XWiki-users mailing list:
After adding a new property "myNewProp" to class "myClass", executing
$doc.display("myNewProp")
in documents already containing instances of "myClass" returns nothing until I do "Edit Objects/Save Objects" on those documents.
Ludovic's reply:
It's not the intended behavior. It seems to be a bug in the $doc.display() function
A workaround is to use a different display function
#set($obj = $doc.getObject("XWiki.MyClass",0))
$doc.display("myNewProp", "edit", $obj)
You should add a task to http://jira.xwiki.org to fix this issue