Details
-
Bug
-
Resolution: Fixed
-
High
-
5.2
-
None
Description
Steps to reproduce:
1. Using a clean, fully patched installation of eZ Publish 5.2, create a new class with the following attributes:
1. Title [Text line], required, searchable 2. Related content [Object relations], not required, searchable
2. Create an object (object_1) of that class, and use the "Object relations" attribute to relate to another object of the same class (object_2);
3. Query "ezcontentobject_attribute" table for object_1 and inspect the XML for the object relations attribute:
SELECT * FROM ezcontentobject_attribute WHERE contentobject_id = <object_1 id> ... <?xml version="1.0" encoding="utf-8"?> <related-objects> <relation-list> <relation-item priority="1" contentobject-id="127" contentobject-version="1" node-id="132" parent-node-id="111" contentclass-id="38" contentclass-identifier="12306" contentobject-remote-id="bbd20309bb9d3e6e7bb7289283f134b2"/> </relation-list> </related-objects> ...
The important bit is contentobject-version="1", which is OK.
4. Edit object_2 and create a new version;
5. Again, query the ezcontentobject_attribute table for object_1 and inspect the XML for the object relations attribute:
<?xml version="1.0" encoding="utf-8"?> <related-objects> <relation-list> <relation-item priority="1" contentobject-id="127" contentobject-version="1" node-id="132" parent-node-id="111" contentclass-id="38" contentclass-identifier="12306" contentobject-remote-id="bbd20309bb9d3e6e7bb7289283f134b2"/> </relation-list> </related-objects>
contentobject-version is still 1, should be 2.