Twig icon indicating copy to clipboard operation
Twig copied to clipboard

1.18 breaks assetic dumps

Open DrewLandgrave opened this issue 11 years ago • 4 comments

So we have an embed that includes some JS and some SASS. Something like this

{% embed 'MyBundle:Form:baseForm.html.twig' %}
    {% block custom_css %}
        {{ parent() }}

        {% stylesheets filter='compass' output='bundles/mybundle/css/mysass.css'
        '@MyBundle/Resources/public/sass/mySass.scss' %}
            <link rel="stylesheet" href="{{ asset_url }}">
        {% endstylesheets %}

    {% endblock %}
    {% block below_main_panel %}
      <CONTENT HERE>
    {% endblock %}
    {% block custom_js %}
        {{ parent() }}

        {% javascripts output='bundles/mybundle/js/myForm.js'
        '@MyBundle/Resources/public/js/form.js' %}
            <script type="text/javascript" src="{{ asset_url }}"></script>
        {% endjavascripts %}
    {% endblock %}
{% endembed %}

Since the 1.18 update the javascripts and stylesheets blocks are being ignored by php app/console assetic:dump

DrewLandgrave avatar Jan 28 '15 16:01 DrewLandgrave

Can you confirm that #1616 fixes this issue?

fabpot avatar Jan 29 '15 07:01 fabpot

@Rhonun Do you perhaps have LiipThemeBundle installed?

https://github.com/liip/LiipThemeBundle/issues/114

XWB avatar Feb 02 '15 14:02 XWB

I do not. When the javascripts and stylesheets declarations are outside of the embed they work. It's when they are inside of it that they don't

DrewLandgrave avatar Feb 02 '15 20:02 DrewLandgrave

Closing as nobody reported the same problem in the last 6 months. Feel free to reopen if you can provide a small snippet that reproduces the problem.

fabpot avatar Aug 15 '15 21:08 fabpot