Search code examples
symfonytwigassetsassetic

sf2 : Unknown "asset" function in "@Twig/Exception/exception_full.html.twig" at line 4


I'm using Symfony 3.1

I have this error when I run app_dev.php :

Unknown "asset" function in "@Twig/Exception/exception_full.html.twig" at line 4.

I already checked my config.yml, and it contains these values :

framework:
    assets: 
        base_path: ~
        ...

I don't know what to do... I hope someone can help me. Thank you !

EDIT : Problem solved. I had to remove custom twig filters in my config.yml... :)


Solution

  • Try to set:

    assets:  ~
    

    Issue about same problem https://github.com/symfony/symfony/issues/17291

    Edit:

    Please also check that`s symfony assets component was installed. The symfony/asset component is required, even in 3.0, by the FrameworkBundle

    As you can see:

    https://github.com/symfony/framework-bundle/blob/master/composer.json

    Another way run update symfony to latest version and update all depend