0
votes

When the WebProfiler page tries to load in my Symfony application, it's not able to load. I get a Twig_Error_Loader exception as shown below.

Unable to find template "@WebProfiler/Icon/symfony.svg|default" in @WebProfiler\Profiler\header.html.twig at line 3.

This twig error is coming from the web profiler bundle.

Any suggestions on how to fix this?

Update: I am running my web application in my development environment after setting having set the Symfony_env to dev. When the home page loads, an alert shows an error message: "An error occurred while loading the web debug toolbar (500: Internal Server Error). Do you want to open the profiler?"

When I click 'ok', I am redirected to the profiler controller. Its not able to render the twig templates. That is when i get the below error.

Unable to find template "@WebProfiler/Icon/symfony.svg|default" in @WebProfiler\Profiler\header.html.twig at line 3.
1
Which version of symfony you're using?Mitesh Vasava
@MiteshVasava I'm using 2.8Tunji
Make sure you have properly installed composerMitesh Vasava
As the .htaccess file is not included in the website-skeleton by default :) composer require symfony/apache-packhabibun

1 Answers

0
votes

try this in your .htaccess , the doc

    <Directory "/Library/WebServer/Documents/Your_public_symfony_directory">
            ....
            FallbackResource /index.php
            ....
    </Directory>