3

On Symfony2/production, I get this error on my log file

request.CRITICAL:
Uncaught PHP Exception Twig_Error_Runtime: 
"An exception has been thrown during the rendering of a template ("The  token storage contains no authentication token.
One possible reason may be that there is no firewall configured for this URL.") in "TwigBundle:Exception:error.html.twig" at line 22."

Following a post, I have in my TwigBundle:Exception:error.html.twig

{% if app.user is defined and is_granted('IS_AUTHENTICATED_REMEMBERED') %}

This is my security.yml

security:
    encoders:
        App\Entity\User: sha512

    providers:
        user:
            entity: { class: App:User, property: email }

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt|error)|css|images|js)/
            security: false

        main:
            pattern: ^/
            anonymous: true
            provider: user
            form_login:
                login_path: /
                check_path: /securite/connexion/check
                use_referer: true
            logout:
                path: app_security_logout
                target: app_homepage

Any ideas ? Thanks

Yohann
  • 265
  • 1
  • 8
  • 17
  • take a look at http://stackoverflow.com/questions/11869921/symfony2-is-grantedis-authenticated-fully-during-404-error-page-display-cau – biera Mar 31 '15 at 11:19
  • Thanks. I didn't see that link before. Strange...deleting {% if app.user is defined and is_granted('IS_AUTHENTICATED_REMEMBERED') %} it's still the same – Yohann Mar 31 '15 at 11:31

0 Answers0