symfony: [3.4] "The "esi" renderer does not exist."

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.0

I just upgraded my app from 3.3.13 to 3.4.0. I’m using render_esi but without Varnish (local) and this exception gets thrown now. I cannot find anything in the changelog that points me to this issue, and haven’t changed anything. In 3.3.13 it was working (and is) properly.

InvalidArgumentException:
The "esi" renderer does not exist.

  at vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php:80
  at Symfony\Component\HttpKernel\Fragment\FragmentHandler->render('http://webshop.tj.dev/app_dev.php/_partial/prods/all-ordered-position?template=Header/Menu/mobileProducts.html.twig', 'esi', array('ignore_errors' => false))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/LazyLoadingFragmentHandler.php:77)
  at Symfony\Component\HttpKernel\DependencyInjection\LazyLoadingFragmentHandler->render('http://webshop.tj.dev/app_dev.php/_partial/prods/all-ordered-position?template=Header/Menu/mobileProducts.html.twig', 'esi', array())
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/Extension/HttpKernelRuntime.php:62)
  at Symfony\Bridge\Twig\Extension\HttpKernelRuntime->renderFragmentStrategy('esi', 'http://webshop.tj.dev/app_dev.php/_partial/prods/all-ordered-position?template=Header/Menu/mobileProducts.html.twig')
     (/dev/shm/sylius/cache/dev/twig/e9/e9fbf256aa4ffb13ca307869b1d470db72cf5d5d8326ad0bbeee5556f72fc6ef.php:43)
  at __TwigTemplate_afcdc7b528eb52c92a069d8db9eef3173363b272acab665985298629010d2c72->doDisplay(array(
...
Lots of variables here :-)
...
 (vendor/twig/twig/lib/Twig/Template.php:366)
  at Twig_Template->display(array())
     (vendor/twig/twig/lib/Twig/Template.php:374)
  at Twig_Template->render(array())
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('@SyliusShop/Homepage/index.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('@SyliusShop/Homepage/index.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:72)
  at Symfony\Bundle\TwigBundle\TwigEngine->renderResponse('@SyliusShop/Homepage/index.html.twig')
     (src/AppBundle/Controller/HomepageController.php:50)
  at AppBundle\Controller\HomepageController->indexAction(object(Request))
  at call_user_func_array(array(object(HomepageController), 'indexAction'), array(object(Request)))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:42)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (14 by maintainers)

Commits related to this issue

Most upvoted comments

In my config_prod.yml I have this:

framework:
    esi: { enabled: true }

On dev I don’t have that, as I don’t want the stuff to be cached while developing. Might be the issue, but used to work in 3.3.13.

Hello, maybe the doc. should include :

framework:
    esi: { enabled: true }

ie in : https://symfony.com/doc/current/http_cache/esi.html it sohuld be added to :

# config/packages/framework.yaml
framework:
    # ...
    fragments: { path: /_fragment }

may here also : https://symfony.com/doc/current/reference/twig_reference.html#render-esi