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

Twig Exception 500 if anonymous can't read standard section

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • QA tracked issues
    • 5.3
    • None

    Description

      If you remove the read - Section(standard) policy from the anonymous role, and try to open the frontend as anonymous, eZ Publish will crash with a "TwigBundle:Exception:error500.html.twig" error.

      Steps to Reproduce

      1. Remove "Content\Read\Section Standard" permission from Anonymous role
      2. Open the frontend ( http://yourSite.com )

      ezpublish/logs.prod.log


      [2014-03-13 12:10:48] app.NOTICE: Siteaccess not matched against configuration, returning default siteaccess.
      [2014-03-13 12:10:48] request.INFO: Matched route "login" (parameters: "_controller": "ezpublish.security.controller:loginAction", "_route": "login")
      [2014-03-13 12:10:48] security.INFO: Populated SecurityContext with an anonymous Token
      [2014-03-13 12:10:48] request.CRITICAL: Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("User does not have access to 'read' 'content'") in "eZDemoBundle::page_header_logo.html.twig" at line 3." at

      /var/www/html/ezpublish5/ezpublish/cache/prod/classes.php line 4539 {"exception":"[object] (Twig_Error_Runtime: An exception has been thrown during the rendering of a template (\"User does not have access to 'read' 'content'\") in \"eZDemoBundle::page_header_logo.html.twig\" at line 3. at /var/www/html/ezpublish5/ezpublish/cache/prod/classes.php:4539, eZ\\Publish\\Core\\Base\\Exceptions\\UnauthorizedException: User does not have access to 'read' 'content' at /var/www/html/ezpublish5/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/LocationService.php:212)"} []
      

      [2014-03-13 12:10:48] security.DEBUG: Write SecurityContext in the session

      Attachments

        Activity

          People

            Unassigned Unassigned
            eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: