Search code examples
phpsymfonytwig-extensionsymfony-3.4

Symfony Unable to load the TwigRenderer runtime


I upgraded from Symfony 3. to 3.4.2. and i got this error on page bundle:

Unable to load the "Symfony\Bridge\Twig\Form\TwigRenderer" runtime.

I tried to upgrade the twig bundle to the latest version (at the time of writing this line) v2.4.4 but in vain. any help please.

This is the error stack trace:

Twig_Error_Runtime:
Unable to load the "Symfony\Bridge\Twig\Form\TwigRenderer" runtime.

  at vendor/twig/twig/lib/Twig/Environment.php:663
  at Twig_Environment->getRuntime('Symfony\\Bridge\\Twig\\Form\\TwigRenderer')
     (vendor/sonata-project/page-bundle/src/Controller/PageAdminController.php:104)
  at Sonata\PageBundle\Controller\PageAdminController->treeAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  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:28)

Solution

  • This error is fixed by upgrading sonata page bundle to 3.7.1