symfony/symfony — Issue #2549: twig shows wrong template name for templates overriden in other bundles
Author: mvrhov
Created: 2011-11-03 05:39:22+00:00
State: open

I have a bundle extending FOSUserBundle. In my bundle I then override FOSUserBundle:Security:login.html.twig.
I need a current locale in my template, now that locale has been moved from session I'm getting the following exception.
Method "locale" for object "Symfony\Component\HttpFoundation\Session" does not exist in "FOSUserBundle:Security:login.html.twig" at line 34
Please note, that that template does not have any locale present and it also has less than 34 lines, but my template does have it. So the correct template name in exception should be ''Foo''UserBundle:Security:login.html.twig, where foo is my vendor name.
I have tested it, and the same applies if template is overridden by placing it into an app/Resources/BundleName/views....
P.S. This is on latest sf2 master and latest twig master.