Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22636

Object Relations versions not saved correctly

    XMLWordPrintable

    Details

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m