Assetic - Route “_assetic_001d5b7_0” does not exist

拟墨画扇 提交于 2019-12-02 20:28:01

I had this problem just one minute ago. Clean up the cache worked for me:

app/console cache:clear --env=prod

Hope this helps.

If clearing the cache or dumping the assets doesn't work. Try noisebleed's comment:

// app/config_dev.yml
assetic:
    use_controller: true
    bundles: ['FooBarBundle']

Maybe you have removed the assetic routing from the app/routing_dev.yml

_assetic:
    resource: .
    type:     assetic

Faced with the same issue but reason was I name template as "something.twig", not "something.html.twig".

Its seems assetic not scan templates without .html in extension.

As result - template work, but assetic not perform dumping/adding routes for assets from it. Adding .html solve the problem.

Updating the config.yml with a dumb character (newline, white space) remove that error. It seems that by doing that, we force the cache do be re-generated. (Symfony 3.0.0)

maybe is too late but... what worked for me:

php composer.phar install
php app/console cache:clear
php app/console cache:warmup
Vaha

Like @Marcus said, if you tried:

php bin/console cache:clear

and it didn't help, please clear the your_project_root/var/cache folder manually (remove all folders and files). If you use unix/linux systems, and receive a system message like "Error removing file: Permission denied", you need to change accesses to dir first, for example you can use console command

sudo chmod -R 0777 /your_site_directory/var/cache/

and after this you can clear cache dir.

I encountered this issue in Symfony 3.3 after trying to override my Twig templates directory. Not sure how to fix the issue, but reverting to default templates directory config resolved the issue for now.

# config.yml
twig:
    paths: ["%kernel.project_dir%/templates"] # Remove this line to use default dir
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!