Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assetic - Route "_assetic_001d5b7_0" does not exist

This question seems to have been asked multiple times but none of the solutions work for me.

I'm in my prod environment, here is what I've done:

  • cleared cache before/after doing anything
  • attempted commenting out the _assetic stuff in config_dev and ensure it isn't anywhere else (not that this should matter in prod env)
  • set use_controller to both true and false (obviously works with true but doesn't use the compiled files)

Is there anything else I'm missing? The files are generating completely fine from php app/console assetic:dump --env=prod --no-debug the file name matches that of in the error minus the route stuff.

like image 268
greg Avatar asked Jul 13 '12 00:07

greg


4 Answers

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

app/console cache:clear --env=prod

Hope this helps.

like image 165
micha149 Avatar answered Nov 01 '22 13:11

micha149


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']
like image 45
Stoked PHP Engineer Avatar answered Nov 01 '22 13:11

Stoked PHP Engineer


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

_assetic:
    resource: .
    type:     assetic
like image 14
user3013964 Avatar answered Nov 01 '22 13:11

user3013964


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.

like image 2
igritsay Avatar answered Nov 01 '22 12:11

igritsay