CSS Loader Cache Time?

Moderator: crythias

Post Reply
DasGravy
Znuny newbie
Posts: 8
Joined: 27 Apr 2012, 04:35
Znuny Version: 3.1.3

CSS Loader Cache Time?

Post by DasGravy »

I've recently been attempting to create several skins for our OTRS installation and it seems that the CSS loader cache time is making things a pain to test. Any idea how long the cache persists before it's refreshed? Is there anyway to force a refresh? It'd be nice to update it after making changes to a skin.

Thanks in advance!
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: CSS Loader Cache Time?

Post by jojo »

bin/otrs.LoaderCache.pl -o delete should help
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
DasGravy
Znuny newbie
Posts: 8
Joined: 27 Apr 2012, 04:35
Znuny Version: 3.1.3

Re: CSS Loader Cache Time?

Post by DasGravy »

Thanks for the quick reply, but that didn't seem to help. Then again, this may be a different problem altogether.

I created the custom skin per the instructions in the documentation. However when I use Firebug to find where the CSS is being pulled from it's still trying to use a non-existent CSS file in the cache:

Code: Select all

http://ourPortal/otrs-web/skins/Agent/custom/css-cache/CommonCSS_f50fe0f83966c0fc7590d82361ff5883.css
Any ideas?
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: CSS Loader Cache Time?

Post by CSL »

First of all, try running /opt/otrs/bin/otrs.DeleteCache.pl
This should remove CSS and JS cache and allow it to re-populate with the updated content.

If that doesn't seem to work, try disabling the CSS loader in sysconfig - FrameWork -> Core::Web - Loader::Enabled::CSS

Refresh a few pages and then re-enable it. This should ensure that it is re-populated properly. A re-start of your web server may also help but shouldn't be needed.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: CSS Loader Cache Time?

Post by schaffel »

I have the same problem.

When I disable Loader::Enabled::CSS my skins work and the right css is loaded.
Then I delete the cache to ensure that it is rebuild when enabled again.
then I even restart the web server.

I navigate a little while and averything looks like it should (the right css files are used).
But when I turn on the loader again, it brings back the style of the default skin.

I the html code there is a reference to three css-cache files:

Code: Select all

<link href="/otrs-web/skins/Agent/default/css-cache/CommonCSS_6387928321946c2b226027a4906e26c5.css" type="text/css" rel="stylesheet">
<link href="/otrs-web/skins/Agent/custom/css-cache/CommonCSS_1dc3397671d0a1eec2b48a148862a32b.css" type="text/css" rel="stylesheet">
<link href="/otrs-web/skins/Agent/default/css-cache/ModuleCSS_6a51c3ed7f7c62ef135f17870e271132.css" type="text/css" rel="stylesheet">
But there is NO file in the cs-cache for my custom skin. So it only pulls the css from the default cache. Is it possible that there is a bug in the css-loader as it oes not create a cache file?

I hope someone has an Idea.
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: CSS Loader Cache Time?

Post by schaffel »

I found out, that it was some kind of a permission problem.
After running the bin/otrs.SetPermissions script with the otrs and www-data user the problem disappeared.
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
Post Reply