Support

Akeeba Ticket System

#30046 Forcing reload of CSS

Posted in ‘Akeeba Ticket System for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Ticket System version
n/a

Latest post by SatIntAKB on Monday, 06 August 2018 05:18 CDT

SatIntAKB
We currently have a CSS override in place at templates/media/com_ats/css/frontend.css

Whenever styling changes are made to the frontend.css file they don't immediately appear on our ticketing system unless the user clears their browser cache or does ctrl shift R on their keyboard.

Is there anyway to encourage ATS to use a fresh version of the CSS file.

I noticed from the source code that a query string is used. Perhaps this could hold the solution?

frontend.css?518e72a1dc85a32b4b894907a14d9990

Thanks,
Dale

nicholas
Akeeba Staff
Manager
There is a way but it will get overwritten every time you update ATS itself.

Edit the administrator/components/com_ats/fof.xml file. Find the line
<option name="factoryClass">FOF30\Factory\BasicFactory</option>

Underneath that line type a new line with the contents
<option name="mediaVersion">YOUR_VALUE_HERE</option>

YOUR_VALUE_HERE is the media version query, i.e. what you see appended to all of ATS' CSS and JS files after the question mark. Changing that every time you make changes will effectively tell your users' browsers to skip the cached version of the file and reload it from your server.

FYI, when the mediaVersion configuration variable is not set in fof.xml our framework calculates it automatically based on the version of ATS currently installed and a unique value for your site (the $secret in your configuration.php). When you set this variable in fof.xml you override the default behavior.

Please note that the fof.xml file is part of ATS itself and it's overwritten every time you upgrade ATS. Therefore every time you upgrade ATS you'll have to do this change again.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

SatIntAKB
Hi Nicholas,

Thanks for your reply.

I've tested your fix and it works really well with our system. I'm now able to push styling changes through easily.

I'll add some notes to our update procedure so we remember to make the change again.

Thanks again,

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!