xyNNN / GoogleTagManagerBundle

Google Tag Manager Bundle for Symfony 2
https://github.com/xyNNN/GoogleTagManagerBundle
GNU Lesser General Public License v3.0
27 stars 15 forks source link

The "google_tag_manager" extension is not enabled. #24

Closed stefandoorn closed 6 years ago

stefandoorn commented 6 years ago

I'm using Twig 2.4.3, Twig Extensions 1.5.1 and Symfony 3.8.3. When autoAppend is enabled, I run into the following error:

Twig_Error_Runtime:
The "google_tag_manager" extension is not enabled.

  at vendor/twig/twig/lib/Twig/ExtensionSet.php:92
  at Twig_ExtensionSet->getExtension('google_tag_manager')
     (vendor/twig/twig/lib/Twig/Environment.php:622)
  at Twig_Environment->getExtension('google_tag_manager')
     (vendor/xynnn/google-tag-manager-bundle/EventListener/GoogleTagManagerListener.php:49)
  at Xynnn\GoogleTagManagerBundle\EventListener\GoogleTagManagerListener->onKernelResponse(object(FilterResponseEvent), 'kernel.response', object(TraceableEventDispatcher))
xyNNN commented 6 years ago

I've updated the bundle to be able to work with Twig ~2.0 ... feel free to update to the new release, see https://github.com/xyNNN/GoogleTagManagerBundle/releases/tag/2.3.1 :)