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

Storing a draft with a bad object relation link should not create an entry in ezcontentobject_link

    Details

      Description

      If you create an ezobject:// link with a bad object ID and store the draft, you get properly warned that the object ID does not exist.
      However, from that point forward, an entry in ezcontentobject_link has been created that will never go away.

      (It will, if you discard the draft at this point. But if you remove the link and publish the draft, the bad entry stays in the table. Each new published object version adds a new bad entry. Removing the object (not move to trash) removes the bad entry. - Gunnstein)

      This will cause problems moving forward – you will get exceptions in the new stack if you use $repository->getContentService()->loadRelations().
      In those cases, unless you manually delete the entry in ezcontentobject_link, a content editor will never be able to fix the problem.

        Activity

        Show
        Gunnstein Lye added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1102
        Show
        Gunnstein Lye added a comment - master: https://github.com/ezsystems/ezpublish-legacy/commit/913dc383ca283db4d5be9939e224e0e6242578a2
        Hide
        Paulo Nunes (Inactive) added a comment -

        QA Approved
        Tested on eZ Publish 5.1, 5.2, 5.3.4 and master

        Show
        Paulo Nunes (Inactive) added a comment - QA Approved Tested on eZ Publish 5.1, 5.2, 5.3.4 and master

          People

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