Php 与Symfony2资产包和'冲突;不存在的路线';
Assetic无法很好地使用此标签:Php 与Symfony2资产包和'冲突;不存在的路线';,php,symfony,Php,Symfony,Assetic无法很好地使用此标签: {% stylesheets output='/style/app.css' '@VendorBundle/Resources/style/main.css' %} <link rel="stylesheet" href="{{ asset_url }}"/> {% endstylesheets %} {%stylesheets输出='/style/app.css' “@VendorBundle/Resources/style/
{% stylesheets output='/style/app.css'
'@VendorBundle/Resources/style/main.css'
%}
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}
{%stylesheets输出='/style/app.css'
“@VendorBundle/Resources/style/main.css”
%}
{%endstylesheets%}
如果我用它,就好像阿塞特不知道该怎么办。在config_dev中,使用控制器
为true。我找不到我做错了什么。我只知道:
在呈现模板期间引发了异常(“无法为命名路由生成URL”\u assetic\u aca6c7a\u 0,因为该路由不存在。”)在“VendorBundle:Section:template.html.twig”中
可能是缓存问题?我不知道我可以尝试什么…只需在config.yml文件中添加捆绑包的名称,这样它就可以拥有创建文件的权限
assetic:
bundles: [ VendorBundle ]
我也有同样的问题。在我的例子中,清除app/cache和app/logs解决了这个问题。我有一个类似的问题,通过在routing\u dev.php中添加一个路由来解决
_assetic:
resource: .
type: assetic
为我工作得很好!