Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset variables not works with CacheBusting #764

Open
vbartusevicius opened this issue Oct 16, 2015 · 1 comment
Open

Asset variables not works with CacheBusting #764

vbartusevicius opened this issue Oct 16, 2015 · 1 comment

Comments

@vbartusevicius
Copy link

If I use assetic variables, like:

    {% javascripts
        ....
        'js/routes.js'
        'js/translations/ThemeBundle/{locale}.js'
        vars=['locale']
    %}

config.yml:

assetic:
    variables:
        locale: [en, ru, ee]

Everything works fine on assetic:dump -e prod - I get what's expected - asset names are suffixed with locale.

But as soon as I enable cache_busting:

assetic:
    workers:
        cache_busting: true
    variables:
        locale: [en, ru, ee]

And now on assetic:dump -e prod Im not getting any assets, suffixed by locale, all of them are suffixed only by cache_busting.

This error I get in log:

assetic.ERROR: The template "UserAdminBundle:Static:create.html.twig" contains an error: The template "js/translations/ServiceFrontendBundle/{locale}.js" contains the variable "locale", but was not given any value for it.

@vbartusevicius
Copy link
Author

Sadly no one else experienced same issue - just stuck again here.
Problem appears when \Assetic\Factory\Worker\CacheBustingWorker::getHash tries to get $factory->getLastModified($asset), debugging this stuff I see there is populates vars array, but no values in values array.

Any hint? Someone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant