General help

 
 
Picture of Myron Netterlund
'Purge all caches' destroys theme in 2.2.3
 

I was chasing an installation issue yesterday & then attempted to use 'Purge all caches' when all my theme styles & css went missing. All that remains is a 'list' format of the entire Moodle site. (This isn't what is declared in the reference docs for P.A.C.) rather it should have:

'Purging these caches will delete that data from the server and force browsers to refetch data...There is no danger in purging caches, but your site may appear slower for a while until the server and clients calculate new information and cache it.'

Didn't think it would delete all the themeing & any navigation blocks. Am I missing a restore button? I've lost left navigation & themeing.

Thanks for any help in advance!

 
Average of ratings: -
Picture of Myron Netterlund
Re: 'Purge all caches' destroys theme in 2.2.3
 

Just tried "Turing off JavaScript Caching in Moodle' as recommended in an earlier post. However it did not restore any navigation or themeing.

http://www.praj.com.au/post/26990496783/moodle-turn-off-javascript-caching

 
Average of ratings: -
Picture of Bret Miller
Re: 'Purge all caches' destroys theme in 2.2.3
Group Particularly helpful Moodlers

Have you tried clearing your browser cache? What happens when you clear the cache is that it has to regenerate the cached pages and cached javascript and css. This means the random names it assigns to the javascript and css will change and if your browser still has the old page loaded, it will continue to try to retrieve the old files. I've seen this on occasion, especially with Chrome, and rarely with Firefox. Generally clearing the cache and restarting the browser will clear up the issue.

 
Average of ratings: -
Picture of Myron Netterlund
Re: 'Purge all caches' destroys theme in 2.2.3
 

Thanks for responding Bret. I tried clearing the browser cache 'from the begining of time' (as Chrome puts it) yet had the same -non results. Firefox has been the same too.

I do see a small icon attatched to the left of the browser window that says (when hovering over) 'unlock all", as if an un-docking button. But it doesn't do anything.

The comlete absence of any theme-ing is odd. To begin with, I had the 'Standard' theme installed for development.

 
Average of ratings: -
Picture of Ken Task
Re: 'Purge all caches' destroys theme in 2.2.3
Group Particularly helpful Moodlers

Could it be the installation issue is related to the clearing of all cache information?  What was the installation issue?  A disclosure of platform/system might be in order.

Check the moodledata folder for the existence of a 'cache' directory.  Permissons on that folder?  Recursive permissions on that folder?

Contains folders for:

htmlpurifier
js
lang
languages
theme

Your default/site theme is the only one in the 'theme' folder/directory.

Just tested with a 2.3.4+ (Build: 20130118) and saw none of what you've described.  Did watch the cache directory build back up as I navigated the site.

Might check (assuming apache) error_logs to see if there is something reported there related to the cache directory.

Is your Moodle on a network that does caching for server?  Have a filtering system? etc.?  Is apache (assuming apache for web server) using mod_expires and/or mod_headers?

If nothing found, suggest turning on debugging.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Bret Miller
Re: 'Purge all caches' destroys theme in 2.2.3
Group Particularly helpful Moodlers

Thanks, Ken. That was going to be my next theory. I'd guess that the cache directory is not writable so that while the database information on the cache was reset, Moodle was unable to generate new files to serve. Look in your moodle_data directory to see if you have something like .../cache/theme/theme-name/css and files in it.

 
Average of ratings: -
Picture of Myron Netterlund
Re: 'Purge all caches' destroys theme in 2.2.3
 

Thanks Gentlemen, I have an Apache 2.2.23 server set-up with PHP 5.3.18 & MySQL 5.1.65. Moodle is 2.2.3 and the installation was the Joomdle (integration of Moodle to Joomla!) version R 0.9. Which I had almost completed successfully until I hit the 'Purge all caches' button. [I had one last item in the webservices checklist to resolve when this happened].

In reviewing the permissions & ownership settings, I found the cache directory to be in ../uploaddata/cache/ & then the directories you mentioned. Directory permissions were suprisingly all 0777 & the account-name as the group-owner. I've since knocked these directories back to 0755 & files being 0644.

I had also loaded a few new themes (Bootstrap, moodle2mobile, & rocket) attempting to restore some view to the interface [presently, as i said, all i see is a list-view of settings].

I have since attempted to set the theme via admin to just the bootstrap theme yet that doesn't display either. Presently Boostrap & Standard are loaded in the Theme directory.

Another noteworthy point: the Joomdle plugin is not being recognized in the admin-settings, and is named by its variable name.

I'll check out hte Apache logs now, but thought i'd get this off while you guys were diligent to respond (i appreciate that! smile )

Pity i was so close (i thought), but these problems are opportunities to learn & share.

 
Average of ratings: -
Picture of Myron Netterlund
Re: 'Purge all caches' destroys theme in 2.2.3
 

Good news. Ken, I took your advice and followed through with strict adherence to the file permissions. Then I returned to the list-item ADMIN view i had & forced the 'Standard' theme (normally empty by default) in Site Admin > Appearance > Theme settings and the view snapped back into shape.

Never got to the Apache logs. Already lost several hours to the 'Purge all caches' switch, of which I'll probably avoid as log as i can into the future. Gun shy now on that 'feature'. I'd like to end this episode with some reasonable explination... but I'll leave that to the Moodle experts.

Thanks for your help today.

 
Average of ratings: -
Picture of Ken Task
Re: 'Purge all caches' destroys theme in 2.2.3
Group Particularly helpful Moodlers

Sounds like you've got it fixed!  Good!

I've almost learned my lesson about 3rd party add-ons ... but like you, I keep hoping I'll acquire enough knowledge to fix 'em. :|  Is that version of joomdle compat with version 2.2.x? 

Have, myself, been tinkering with Joomla as backend for some things in Moodle - without any 3rd party add-on.  Yes, it's limited ... doesn't have SSO, etc. but maybe that's good! ;)

Moodle 2 has a mobile theme.  Is there something 'moodle2mobile' does that the built in mobile theme doesn't do?

Might I suggest a more 'conservative' approach?  Rather than adding 3 themes, a mod, etc. all at once ... how about a little at a time?  As they say,  'Rome wasn't built in a day!'  And it sure is painful when 'Rome burns' before it's time! ;)

'spirit of sharing', Ken

 
Average of ratings: -