1

I'm using the HampeZurbInkBundle for email templates in Symfony3. In one of my templates being called from a service I have this line:

{% extends 'HampeZurbInkBundle:FoundationForEmails:2/base.html.twig' %}

This works without issue on my local environment (Mac/env=dev) but on production (Linux/env=prod) when the template is used I get this error in the log:

Unable to find template \"HampeZurbInkBundle:FoundationForEmails:2/base.html.twig\"

I have checked and the file absolutely does exist.

The details of the error:

looked into: /var/www/html/site/app/Resources/views, /var/www/html/site/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in \"CoreBundle:Email:password_reset.email.twig\" at line 1. at /var/www/html/site/vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:128, Twig_Error_Loader(code: 0): Unable to find template \"HampeZurbInkBundle:FoundationForEmails:2/base.html.twig\" (looked into: /var/www/html/site/app/Resources/views, /var/www/html/site/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in \"CoreBundle:Email:password_reset.email.twig\" at line 1. at /var/www/html/site/vendor/twig/twig/lib/Twig/Loader/Filesystem.php:247)"}

Case sensitivity is not the problem as I have checked this.

nixxblu
  • 192
  • 8

1 Answers1

0

The problem was due to the fact that AppKernel.php wasn't up to date on the server. It wasn't registering the bundle. It now works.

nixxblu
  • 192
  • 8
  • I am facing a similar error (http://stackoverflow.com/questions/43136638/symfony3-in-prod-look-for-twig-template-in-wrong-folder-instead-of-custom-bundle) what do you mean by "AppKernel.php wasn't up to date on the server". It did not contain `new HampeZurbInkBundle\HampeZurbInkBundle()` in the `registerBundle()` function? – nyluje Mar 31 '17 at 10:33