We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Erik Smit
  2. General Discussion
  3. Thursday, 29 October 2015
  4.  Subscribe via email
I just discovered a small flaw in the T3 plugin.

Within my template I make use of a custom.css file.
This css file is included in the head block.

For various reasons I wanted to add versioning to the css file.
By just adding "?201510291500" to the css file.

This works very well with the standard Joomla function addStylesheet().
(although there is also a addStylesheetVersion() wrapper for this)

For some reason the versioning was stripped from the declaration when loading the webpage.
After investigating why this happened I ended up in the T3 plugin.
To be specific: the function updateHead() in the T3Template class.

This function strips all T3 head inserts (css and scripts), and then replaces them depending on the state of the template.
Exactly at that point versioning is stripped from the custom.css declaration (by the regex).

Not a very nice and neat thing to do I think.
Maybe the T3 team can update this function to leave the versioning attachted to the css (or script) declaration?
I would be very happy if they do just that.

Thank you in advance.

Erik Smit
The Netherlands
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Thanks for your report, I will replicate the issue from our side to see if it is error or not.

Regards.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
I also have this problem. Without a version on the CSS the user has to "hard" refresh the browser to get the current custom.cc file. Most won't do that so many problems occur when changing the custom.css.

The thread below has given me a reasonable work around that allows me to include my custom.css as customxxx.css. However I have to remember to rename the file in the head.php file ie. ($this->addCss('layouts/customxxx');

http://www.t3-framework.org/discussions/how-to-have-a-css-custom-file-for-each-layout.html#reply-5926

Hope this helps

Tom
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hello,

I have a huge problem with custom.css versioning. I currently solved it with Toms suggestion. But what i just noticed is my custom.ccs is empty and i create a new one called mycustom.css and browsers like Safari or IE have a huge problem with caching. Now css style is taken from both files and all is just a huge mess.

Versioning is the only option to clear cache my user. Could you please send me some instruction how could i solve this as soon as possible.

How is versioning taken care of in t3 framework in general?

Thank you very much for your help.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.