Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.") #84

Open
Algiu83210 opened this issue Jan 23, 2021 · 1 comment

Comments

@Algiu83210
Copy link

Hello,

I am beginner. I am trying to use cookie-consent-bundle.
I am on symphony 4.4. I installed the bundle like explained in Step 1: Download using composer
Then I try to add cookie consent to my homepage adding this code in twig homepage file:

{{ render_esi(path('ch_cookie_consent.show')) }}
{{ render_esi(path('ch_cookie_consent.show_if_cookie_consent_not_set')) }}

When I run the homepage I have the following error message:
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").

What I missed please ?

Thank you.

Alex

@kdefives
Copy link
Contributor

kdefives commented Feb 3, 2021

Hello Alex,

Add "esi: true" in your framework.yaml and it should works.

Doc : https://symfony.com/doc/current/http_cache/esi.html#using-esi-in-symfony

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants