<\/script>')

Conflicts with Symfony2 AsseticBundle and "nonexistent routes"

Assetic does not work very well with this tag:

{% stylesheets output='/style/app.css' '@VendorBundle/Resources/style/main.css' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} 

If I use it, he, like Assyphus, does not know what to do with it. In config_dev, use_controller true. I cannot find what I am doing wrong. I just understand:

During the rendering of the template ("Unable to create a URL for the specified route" _assetic_aca6c7a_0 "there was no exception") in "VendorBundle: Section: template.html.twig".

Maybe a cache problem? I do not know what I can try ...

+4
source share
3 answers

I had the same problem. In my case, clearing the application / cache and application / logs solved the problem.

+5
source

Just add the name of your package to the config.yml file so that it can have permission to create files.

 assetic: bundles: [ VendorBundle ] 
+3
source

I had a similar problem, solved by adding a route to routing_dev.php

 _assetic: resource: . type: assetic 
0
source

Source: https://habr.com/ru/post/1499925/


All Articles