Theme cache won't empty upon upgrade

Theme cache won't empty upon upgrade

by Dustin Horstmann -
Number of replies: 16

Hello, I just upgraded the decaf theme from 2.3 to 2.4. Problem is, it won't reflect a theme upgrade. We have a test site and the theme upgraded just fine. Strange.  

It appears the issue is caching.

I have tried:

- purging all caches

- clearing theme cache

- clearing browser cache

- running cron.php

- deleting the theme all together, then reinstalling from scratch

On the last point, oddly, upon reinstall, after clearing all caches, the theme loads with custom settings from my previous install of the theme. So somewhere, things are being cached. 

Does anyone have an idea where that "somewhere" is? I would like to install the theme fresh in hope that that will fix this theme upgrade issue. 

Average of ratings: -
In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

What is your evidence for it caching? What did you expect to change that didn't?

In reply to Howard Miller

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

It is only an assumption actually smile, but here's why I think it is cache:

When I deleted the theme from my server and purged caches, then uploaded a freshly downloaded theme, the new theme had custom settings (which were custom links) from my previous version of the theme. That could only happen if that information was being stored somewhere, not targeted by my cache clearing. 

Make sense? 

So I want a completely fresh start, if possible. 

Thanks for the response! smile Any ideas would be great. 

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The config settings are held in the database. They are not deleted by deleting the theme. So, yes, if you delete a theme and upload a new version of the same theme (or more accurately a theme with the same name) then any matching settings will be remain.

This is how it's meant to work.

In reply to Howard Miller

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

Howard, thanks for the help. 

Is there anyway to target the config settings in the database and delete them? 

If so, where can I find the steps?

Thanks again!

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I think you are getting hung up on those settings and I don't really understand why. They are just settings - they don't do anything else. They only do anything if the theme code accesses them - it's that code that matters. Why do you care?

Whatever your problem is I know one thing it isn't - it's not the mere fact the settings exist in the database.

In reply to Howard Miller

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

Thanks for the feedback. 

It's the only solution I can think of concerning why a theme works on our test site, but not on our live site, with the same Moodle build. 

I figured this had to do with some sort of caching, and tried clearing those (see the above). 

Do you have any ideas why a theme wouldn't work in this case? 

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Let's take a step back then... exactly what do you mean by "theme isn't working"?

In reply to Howard Miller

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

Thanks for the help. 

In theme settings, you can add custom menu items.

In the Decaf theme, doing so triggers a div with the id "custommenu". This all works fine on our test site, using the same 2.4.3 version of Moodle and same version of theme as on live, but on live, the "custommenu" div isn't triggered when I add items in the custom menu items field. 

Everything seems to be the same, so I'm totally confused about the result. 

Any ideas?

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You don't have the site in 'maintenance mode' do you?

In reply to Howard Miller

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

I've tried updating the custom menu list without being in maintenance mode, and the problem still persists. 

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Luis de Vasconcelos -

Did you try restarting the server?

Do you have a PHP accelerator installed (e.g. eAccelerator, APC, XCache, WinCache, etc...)?

In reply to Luis de Vasconcelos

Re: Theme cache won't empty upon upgrade

by Dustin Horstmann -

Luis, thanks for the feedback.

How do I check if this is installed?

How do I restart our server? 

 

In reply to Dustin Horstmann

Re: Theme cache won't empty upon upgrade

by Luis de Vasconcelos -

> How do I check if this is installed?

The easiest way would be to check the output of the PHPInfo() command. There's a section in the output of PHPInfo() that tells you which PHP accelerator is installed, if any.

> How do I restart our server?

Push the power button! big grin

Seriously, it depends on your OS. In Windows click Start / Shutdown / Restart.
Unix? I'm not sure... perhaps: shutdown -r

Or just bribe your IT guy to do it.