symfony - Assetic not dumping certain files -


in main layout page symfony2 project have assetic blocks css , javascript follows:

{% block stylesheets %}     {% stylesheets         'bundles/my_bundle/css/main.css'         'bundles/my_bundle/css/additional.css'         'bundles/my_bundle/css/new.css'         filter='cssrewrite'         output='css/packed/layout_default.css'     %}     <link type="text/css" rel="stylesheet" href="{{ asset_url }}" />     {% endstylesheets %} {% endblock %}  {% block javascripts %}     {% javascripts         'bundles/my_bundle/js/main.js'         'bundles/my_bundle/js/additional.js'         'bundles/my_bundle/js/extra.js'         output='js/packed/layout_default.js'     %}     <script type="text/javascript" src="{{ asset_url }}"></script>      {% endjavascripts %} {% endblock %} 

there other files contain these blocks project multi-theme enabled one.

recently (without changing assetic-related) have noticed when

app/console assetic:dump 

the command stalls 10 seconds, if rebuilding cache or something, , begins dump files. .js files dumped correctly, , css files non-default themes.

however, css files above blocks not dumped, , way have found remedy edit layout page , remove 1 of css files within stylesheets block, run dump command, add stylesheet in, , re-run command. after doing this, subsequent assetic:dumps run properly, albeit still initial pause.

has experienced behaviour similar this, or have pointers can troubleshoot further?

i experienced similar behavior when doing small changes output-name asset collections ...

however clearing cache prior dumping fixed issue me.

therefore execute:

app/console cache:clear --no-warmup && assetic:dump --no-debug

and have aliased s ca:c in zshrc.

i advise use pre-configured asset collections in config.yml ( or imported file ) mentioned in this answer. compacts templates , makes them more readable.


Comments