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

legacy admin: autosave will delete information about relations if AdvancedObjectRelationList = enabled

    Details

      Description

      When "AdvancedObjectRelationList" and the autosave feature are enabled, editing a related target object directly will remove the relation information from the source object's full view.

      TEST:

      set
      [BackwardCompatibilitySettings]
      AdvancedObjectRelationList=enabled
       
      - create an object X with a relations attribute, fill the relation with 1 target object, Y, and publish.
      - open the object X in the backend, the Relations tab should have 1 relation
       
      (use a second tab to make navigation easier. using 2 tabs has no effect on the issue at all)
      - In a new tab, edit the object X. Within the object relations field, edit the related object Y. trigger eZ Autosave to fire.
       
      - back In the first tab, clear caches using the right toolbar. Notice how object X no longer has any relation in the Relations tab.
       
      - In the second tab, discard the draft, close the tab
       
      - in first (and now only) tab, reload the full view of object X. the relation to Y does not show anymore.
       
      as secondary tests:
      - open X for edit. check that Y is still in the relations list
      - open X in a front end. check that Y shows as a related object. 
      

        Issue Links

          Activity

          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for 4.5, 4.6, 4.7, 5.0, 5.1, 5.2, 5.3, 5.4 and master.
          Issue could not be reproduced on a 5.1 and 5.2, so sanity testes were made in the scope. Thus, the suggested fixes applied for said versions didn't seemingly change any behaviour.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for 4.5, 4.6, 4.7, 5.0, 5.1, 5.2, 5.3, 5.4 and master. Issue could not be reproduced on a 5.1 and 5.2, so sanity testes were made in the scope. Thus, the suggested fixes applied for said versions didn't seemingly change any behaviour.
          Show
          Gunnstein Lye added a comment - - edited PR: https://github.com/ezsystems/ezpublish-legacy/pull/1161 Merged in master: https://github.com/ezsystems/ezpublish-legacy/commit/6ae131d0b0bc3b6f82ccc5e064687d4c3ca36288
          Hide
          Gunnstein Lye added a comment - - edited

          Confirmed on 5.4, partially. The related object Y disappears from the Relations tab of the full object view, but not from the object view itself. It is not removed from ezcontentobject_link, but the status of the current_version of Y in ezcontentobject is set to 0 (draft) which is why it isn't shown in the related object list. If I edit and publish Y, it shows in the list again.

          I suspect that this part is wrong or incomplete:
          https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php#L461

          It is ancient though, 2003 or older:
          https://github.com/ezsystems/ezpublish-legacy/commit/e6647e2e27572395a08c16e9089e6e558de7af69#diff-ba3bb3637db36baecce818bf6091e025R251

          Show
          Gunnstein Lye added a comment - - edited Confirmed on 5.4, partially. The related object Y disappears from the Relations tab of the full object view, but not from the object view itself. It is not removed from ezcontentobject_link, but the status of the current_version of Y in ezcontentobject is set to 0 (draft) which is why it isn't shown in the related object list. If I edit and publish Y, it shows in the list again. I suspect that this part is wrong or incomplete: https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php#L461 It is ancient though, 2003 or older: https://github.com/ezsystems/ezpublish-legacy/commit/e6647e2e27572395a08c16e9089e6e558de7af69#diff-ba3bb3637db36baecce818bf6091e025R251
          Hide
          Peter Keung added a comment -

          One important thing to note is that this is not just a display issue in the Relations tab, but that the entry from the ezcontentobject_link table is removed.

          Show
          Peter Keung added a comment - One important thing to note is that this is not just a display issue in the Relations tab, but that the entry from the ezcontentobject_link table is removed.

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Bras (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 7 hours, 30 minutes
                7h 30m