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

Token not found exception in ContentViewBuilder when used to build own exception page


    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 1.7.8, 1.13.4, 2.2.3, 2.3.2
    • Fix Version/s: 1.7.9, 1.13.5, 2.3.3, 2.4.1
    • Component/s: Permissions
    • Labels:


      The issue happens in all cases when Symfony's Security Component has not been initialised yet, for instance, when any router throws exception.

      Steps to reproduce

      1. Create own ExceptionController
      2. Configure Twig to use custom ExceptionController


            exception_controller: App\Controller\ExceptionController::showException

      3. In the custom controller try to render template. In template try to do:

         {{ render(controller('ez_content:viewLocation', {
        	'locationId': locationId,
        	'viewType': 'embed'
        })) }}

        where locationId is some existing location.

      4. You should see 500 error and exception like Token not found in token storage....

      As discussed with Bertrand Dunogier and André Rømcke, ContentViewBuilder should use our PermissionResolver instead of Symfony's AuthorizationChecker.


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        12s 1 Kamil Madejski 20/Dec/18 3:50 PM
        Confirmed Confirmed InputQ InputQ
        21h 47m 1 Kamil Madejski 21/Dec/18 1:38 PM
        InputQ InputQ Development Development
        3s 1 Kamil Madejski 21/Dec/18 1:38 PM
        Development Development Development Review Development Review
        7m 5s 1 Kamil Madejski 21/Dec/18 1:45 PM
        Development Review Development Review Documentation Review done Documentation Review done
        20d 7h 6m 1 André Rømcke 10/Jan/19 8:51 PM
        Documentation Review done Documentation Review done QA QA
        12d 14h 15m 1 Marek Nocoń 23/Jan/19 11:07 AM
        QA QA QA Done QA Done
        1d 22m 1 Marek Nocoń 24/Jan/19 11:30 AM
        QA Done QA Done Closed Closed
        21s 1 Marek Nocoń 24/Jan/19 11:30 AM


          • Assignee:
            Kamil Madejski
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: