I upgraded my symfony project from 2.8 to 3.4. All is OK except access to js and css.
As I used assetic bundle in 2.8, I kept it after upgrade. When I try to update js/css in my project, I run the commands php bin/console cache:clear , php bin/console assets:install web and php bin/console assetic:dump. The problem is that js/css are stored in web/bundles/mybundle/.. but they are called in web/css et web/js in HTML. This issue is the same for dev or prod environment.
This is an exemple of the code in my twig template :
{% javascripts '@MyBundle/Resources/public/js/add_detail.js'
'@MyBundle/Resources/public/js/add_publication.js %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
In the final HTML, the js is called with this line :
<script type="text/javascript" src="/js/db6ab9c_add_detail_1.js"></script>
<script type="text/javascript" src="/js/db6ab9c_add_publication_2.js"></script>
How can I make to have a good reference for my css/js in HTML code ?
Test =>
Or You can call your file one by one with {{ asset('') }}