twig - Symfony2 assetic javascript Files have different names in markup vs. on disk -
i have 2 environments... local development env running mamp , and lamp server shared development team testing. both environments using dev symfony environment (app_dev.php) , have disabled assetic_controller. on our local setups, consistently able create changes, run cache:clear , assetic:dump, , works should. on our shared environment (which deploy using magellanes) end odd scenario javascript files in our bundle's public/resources/js written web/js different filenames referenced in generated html embedded.
so example, in twig template there this:
{% javascripts '@mygreatbundle/resources/public/js/default/*' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
what gets written in html is:
<script type="text/javascript" src="/js/60d13ef_part_1_myscript_7.js"></script>
but gets dumped disk in web/js is:
60d13ef_part_1_myscript_6.js
the deployment steps (summarized) this:
deploy via git rebase set global parameters symfony install vendors via composer cache clear assetic dump cache warmup release (manipulating symlinks) dump apc cacheso heck doing wrong? when go in after deployment , manually clear cache / run assetic:dump, problem persists. every 1 time in while deploy , works, mostly, not. also, working reliably while , stopped. out of ideas track downwards issue.
this looks bug. 1 of js files began uppercase letter, , files beingness sorted differently when beingness written html when beingness written disk. filed next bug report. hope helps someone:
environment:
centos release 6.5 (final) symfony 2.5 php 5.3.3when referencing whole directory of assets, eg. resources/public/js/default:
ascript.js bscript.js cscript.js
like so:
{% javascripts '@mygreatbundle/resources/public/js/default/*' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
what gets written in html is:
<script type="text/javascript" src="/js/60d13ef_part_1_ascript_1.js"></script> <script type="text/javascript" src="/js/60d13ef_part_1_byscript_2.js"></script> <script type="text/javascript" src="/js/60d13ef_part_1_cscript_3.js"></script>
but written disk in web/js is:
60d13ef_part_1_bscript_1.js 60d13ef_part_1_cscript_2.js 60d13ef_part_1_ascript_3.js
so of javascripts 404. renaming ascript.js ascript.js resolves issue.
symfony2 twig assetic
No comments:
Post a Comment