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

SPI: loading (reverse) relations does not check for published Content

    XMLWordPrintable

    Details

      Description

      In Legacy Storage Content gateway methods loadRelations() and loadReverseRelations() do not limit the result to the published Content. Only loadReverseRelations() limit the related Content to the current version.
      This is not sufficient and results in incorrect data returned in two cases:

      1. when Content is in ARCHIVED state
      2. when Content has only first (unpublished) draft

      test case is:

      1- two objects A, B
      2- object A has object relations, B is included
      3- on frontend, open object A, B shows as related
      4- with a command, show list of related objects to A: B is included
      5- in admin, remove B to trash
      6- reload A in front end, B is gone
      7- with the command B still shows in the relations list

      the command to used to test can be found here: https://gist.github.com/pbras/8453875

      it's a simplified version of the example case found in documentation here:
      https://github.com/ezsystems/CookbookBundle/blob/master/Command/ViewContentMetaDataCommand.php

      the same result is shown in step 7 even if in 5 the objects is removed completely. clear caches from command line, admin, or even removing them from disk will not have any effect.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            paulo.bras@ez.no 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 - 2 days, 1 hour
                2d 1h