Installation help

Theme cache won't empty upon upgrade

 
 
Picture of Dustin Horstmann
Theme cache won't empty upon upgrade
 

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: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

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. 

 
Average of ratings: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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.

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

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!

 
Average of ratings: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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.

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

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? 

 
Average of ratings: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

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?

 
Average of ratings: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

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

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

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

 
Average of ratings: -
Sketch...
Re: Theme cache won't empty upon upgrade
Group Particularly helpful Moodlers

Did you try restarting the server?

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

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

Luis, thanks for the feedback.

How do I check if this is installed?

How do I restart our server? 

 

 
Average of ratings: -
Sketch...
Re: Theme cache won't empty upon upgrade
Group Particularly helpful Moodlers

> 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.

 
Average of ratings: -
Picture of Howard Miller
Re: Theme cache won't empty upon upgrade
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

On Linux... as root...

reboot

wide eyes

 
Average of ratings:Useful (1)
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

Thank you, Howard smile

 
Average of ratings: -
Picture of Dustin Horstmann
Re: Theme cache won't empty upon upgrade
 

smile Luis, thank you for the feedback! 

 
Average of ratings: -