3

i'm working on a sf2 project for last 3 months where i've been using assetic without problems. But now, when calling assetic on a new template i get de following error Route "_assetic_baa4710.js" does not exist which can be workaround by:

#config_dev.yml
assetic:
    use_controller: false

and removing the following assetic config from routing_dev.yml

#routing_dev.yml
#_assetic:
#    resource: .
#    type:     assetic

Does any one knows what's going on? Thx a lot! :D

peris
  • 943
  • 3
  • 20
  • 33
  • I find that I often have to completey delete the cache directory when adding a new template containing a assetic manages stylesheet. Never tracked down why. I just live with it. – Cerad Apr 16 '12 at 12:45
  • @Cerad I guess that's because AsseticBundle only searches for template files (in every registered bundle) when the cache is empty. That's why you need to clear `app/cache//assetic` to force a new lookup. – noisebleed Apr 17 '12 at 09:40

4 Answers4

1

I believe noisebleed's comment is the solution, it worked for me.

// app/config_dev.yml
assetic:
    use_controller: true
    bundles: ['FooBarBundle']
  • worked for me in production changing the config.yml to above. After changing clear cache for --env=prod – GAV Nov 02 '17 at 10:12
0

do a cache clear and problem should fix

php app/console cache:clear

Irinel
  • 9
  • 1
0

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

php composer.phar install
php app/console cache:clear
php app/console cache:warmup
augustocosta
  • 139
  • 1
  • 2
  • 8
0

Do a cache clean using

rm -rf apps/cache

Assetic - Route "_assetic_001d5b7_0" does not exist

Community
  • 1
  • 1
Ahad Ali
  • 398
  • 5
  • 11