1

I faced a problem in Joomla 3. For example, I try to add a JavaScript file with auto-version option:

JHtml::_('script', '/path/to/script.js', array('version' => 'auto'));

It works. CMS adds to HTML something like this:

<script src="/path/to/script.js?1e1d67808f340bae20c17f7434590e08" type="text/javascript"></script>

But when I modify this file, this version remains the same.

I found in core classes Document and Version and methods for manipulations with MediaVersion, but it clarified nothing.

So, my question. How does it works. How this version refreshes?

0

A bit late to the party, but i was wondering the same thing. If you don't set the version yourself in the options off addScript, Joomla will check in the joomla library extension database table row. If the parameter if not set, or if you are in debug mode, it will generate a new version. So, to get a new version, just switch joomla debug on then off.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.