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

Unable to view/edit Role that contains Policy with removed Limitation target

    Details

      Description

      After deleting a Content Type which is the Limitation target for one or more policies, you cannot navigate to the Role that contains these policies in the Platform UI. The error returned for the user is the following: "Failed to load 'http://your-site.dev/pjax/role/view/5'".

      Related error from the logs:

      [2017-12-15 08:53:04] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("Could not find 'eZ\Publish\SPI\Persistence\Content\Type' with identifier 'ID: 13, Status: 0'")." at XXX\vendor\ezsystems\platform-ui-bundle/Resources/views/Role/view_role.html.twig line 66 {"exception":"[object] (Twig_Error_Runtime(code: 0): An exception has been thrown during the rendering of a template (\"Could not find 'eZ\\Publish\\SPI\\Persistence\\Content\\Type' with identifier 'ID: 13, Status: 0'\"). at C:\\Apache24\\htdocs\\ezplatform\\vendor\\ezsystems\\platform-ui-bundle/Resources/views/Role/view_role.html.twig:66, eZ\\Publish\\Core\\Persistence\\Legacy\\Exception\\TypeNotFound(code: 404): Could not find 'eZ\\Publish\\SPI\\Persistence\\Content\\Type' with identifier 'ID: 13, Status: 0' at C:\\Apache24\\htdocs\\ezplatform\\vendor\\ezsystems\\ezpublish-kernel\\eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Handler.php:243)"} []
      

      Steps to reproduce

      1. Create a new eZ Platform installation.
      2. Create a new Content Type.
      3. Create a new Role.
      4. Create a new Content/Read Policy in the Role created in the previous step. Add Content Type created in the second step as Limitations->Class for this Policy.
      5. Remove Content Type created in the second step.
      6. Try to navigate to the Role created in the third step (in the Platform UI: "Admin Panel"->"Roles"->Name of the Role).
      7. Confirm the error described above.

      Content Type Limitations may not be the only ones that are affected by this, other Limitations should also be checked.

        Activity

        Hide
        Jacek Foremski (Inactive) added a comment - - edited

        I wasn't able to verify this issue on 1.7.6 because of the following issue: EZP-28546.
        I verified it and this issue doesn't happen on eZ Platform 1.7.6.

        Show
        Jacek Foremski (Inactive) added a comment - - edited I wasn't able to verify this issue on 1.7.6 because of the following issue: EZP-28546 . I verified it and this issue doesn't happen on eZ Platform 1.7.6.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jacek Foremski (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: