Moodle displays no theme when page is refreshed

Moodle displays no theme when page is refreshed

by Lisa Thiessen -
Number of replies: 31

I am having the same problem... but with Arialist.  It started happening just in Chrome and Safari, but now the site almost never loads in format, and will lose format if refreshed.  There were teachers putting in content when it first started happening: adding to the glossary, setting up the #weeks, etc. I'd be happy to go back to the standard theme if this was not going to be an issue there.

TIA

(Edited by Mary Evans - original submission Friday, 2 September 2011, 09:11 PM)

Average of ratings: -
In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi

Can you supply a link to your site? Diagnosing a problem is made easier if we can see it first hand.

Can you also tell me which version of Moodle you are using?

Thank you
Mary

In reply to Mary Evans

Re: Moodle displays no theme

by Lisa Thiessen -

HI Mary,

I'm using 2.0.2,  here:

http://www.shelterguides.com/moodle/

Thanks so much for looking.  This has us perplexed. (We're new to this, so that's not all that hard)

It doesn't seem to be working for anyone on my team, in any browser at all now.

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Lisa,

If you can Login, try going to Settings > Site Administration > Development > Debugging -> select  Developer Mode from the top most menu. and enable the option to display errors on page.

When I first went to the site and tried a few things, like going to Admin page I got this server error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@shelterguides.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Which is a good thing as any of the above could be part of your problem. Searching through Server Error Logs is a good starting point.

I am not too good with server side problems so it might be better if I split this disscussion from the original post, and then Move it to Instalation Problems where Colin or Howard are more experienced and better giving you advice.

Mary

In reply to Mary Evans

Re: Moodle displays no theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

@Colin or @Howard

If either of you get to read this, take a look at this site http://www.shelterguides.com/moodle/

It should load on first visit with the Arialist theme, but if you go to 'refresh' the browser window it loses the theme layout. I'm wondering if root config.php is not configured correctly, as you can get a redirect message if you go to http://shelterguides.com/moodle/

What do you think? Have you come across this sort of behaviour before?

Cheers

Mary

In reply to Mary Evans

Re: Moodle displays no theme

by Mauno Korpelainen -

Domain name of this site is shelterguides.com and if you try to go to www.shelterguides.com you are redirected to shelterguides.com

So site config.php should probably have

$CFG->wwwroot   = 'http://shelterguides.com/moodle';

and it currently has

$CFG->wwwroot   = 'http://www.shelterguides.com/moodle';

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

Thank you sooooo much for looking at this.  Where do I find the $CFG value to change it? 

Thanks again,

Lisa

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

File config.php (with $CFG->wwwroot) is in the same folder as your moodle - you may be able to use some site administration tools like CPanel to edit that file or for example use some ftp program (filezilla etc) to download config.php to your local computer, edit it with some simple text editor like notepad (not MS Word) and upload back to correct folder...

 

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

Hi, thanks for your patience with this.

I modified the file in notepad and uploaded it back, but now nothing is displaying.  Should I put the www. back in? It's also not letting me log in now (to Moodle), even though I'm using the remembered username and password (autofill) that I've used all along.

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

I think there is still something wrong in server configuration.

http://shelterguides.com/moodle/index.php is rendered fine (well - sometimes smile ) so in addition to site redirection (created with CPanel?) it looks like your site might look for index.html or index.htm files but not index.php files by default.

It can be changed most likely in CPanels with something like http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/DirectoryIndex or in some cases people add/edit a .htaccess file to the web root (public_html) with line

DirectoryIndex index.php index.html index.htm

Anyway your site should automatically look index.php (before other index files) if only folder name is given. And on most sites you can use both www.sitename.xxx and sitename.xxx - did you create site redirection rule with some CPanel tool (Forward?) Can you change that url rewrite rule back (from CPanel etc)?

$CFG->wwwroot can use both www.sitename.xxx and sitename.xxx if that path itself is stable and does not get redirected.

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

I didn't use the cPanel directory for redirection.  The only cPanel I used was Fantastico for the Moodle install.

Made the changes that you recommended (thanks, BTW).  Unfortunately, after it looked like it was up and could be viewed in the theme, it's not loading that way anymore again, just with no theme.

It's giving me a 505 error after this msg...

It says:

skip to main content

Incorrect address detected, server can only be accessed through "http://shelterguides.com/moodle" address, sorry.

Please notify server administrator.

(Continue)

 

--it seems to redirect on it's own most of the time, within a couple of seconds. it's only giving me the 505 error message following this screen some of the time, some of the time it is just displaying the site without theme.

I really appreciate you looking at this with me.

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

Fantastico scripts have had "strange" problems with moodle for years... and if your host is GoDaddy it doubles the risk...

Anyway - it might be best to start from the beginning and uninstall moodle from the same Fantastico link "moodle" that you used when you installed moodle with Fantastico. There should be a Remove option.

You could try again (once) with Fantastico installer with default settings and if just does not seem to work you could try to download a new version from http://download.moodle.org/ - there are some forum posts and docs here available that explain how to install moodle without Fantastico.

Fantastico scripts are not using the latest code from moodle.org and they can have all kinds of modifications so it can be hard to track down the original problem with these url redirections - or timeouts.

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

I was afraid of that, but owell.  Do you know if I can install an new instance of moodle and still use the same databases?  Or do we have to re-enter all of our current course info?

Lisa

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

Yes, it is possible to install several instances of moodle even if you had only one database - you can use different $CFG->prefix in config.php (and this way  different table prefix in database) - moodle asks the prefix when you install it. Then you need a different moodledata folder for different sites (you can name moodledata to what ever you want as long as you know the path - and moodledata should not be directly web accessible, not inside web root) and of course you can place your moodle package to what ever folder inside web root, folder name does not need to be moodle.

Or you may use different databases for different versions of moodle (CPanel has PhpMyAdmin that usually gives you option to install at least a couple of databases).

And also Fantastico installs can be upgraded to use the latest code from moodle.org - it just takes a little more than one click smile See for example http://docs.moodle.org/20/en/Upgrade

+ you may need to set different cookie prefix from Site administration > Server > Session handling > Cookie prefix if you have more than one moodle site on the same domain to prevent "mixing cookies"

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

Thanks so much for everything here.  I'll do a re-install today, the download, do-it-yourself- style.

All the best,

Lisa

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Lisa Thiessen -

I installed 2.0.4+ tonight, after much struggle.  It is displaying the exact same way that the other did, that was installed by Fantastico.

I downloaded from Moodle, chose this version based on the php version that my server has.  I used Filezilla to upload the .zip, then cPanel File Manager to extract on the site.  I ran the php_install script, and configured it to my database.  (I made a new database for it).  

I really don't know what to do at this point.

Any ideas?

It only displayed with a theme in one screen, then went to the non-display thing again.  Also, as before, it is not showing the little task icons next to things like 'edit settings', 'backup', 'restore'

There was no .php_ini file to ensure had the intl extension...could that be my problem?

My course is advertised to launch through a local college Sept 12.  Could there be a virus on the server? It seems crazy that two different versions installed totally different ways would have the same problem.

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

No, it's not a virus but your site has still that url rewrite rule enabled and http://www.shelterguides.com goes to http://shelterguides.com

Can you doublecheck that your config.php has

$CFG->wwwroot   = 'http://shelterguides.com/moodle';

and not

$CFG->wwwroot   = 'http://www.shelterguides.com/moodle';

intl extension is useful but not necessary - and on shared hosts you can often add (create and edit with text editor) local php.ini files to web root, but you could check such things from your host support forums or FAQ. Or some hosts allow local .htaccess files and some hosts even help in site configuration - like these apache url rewrite rules etc.

Oh - and one more thing - moodle 2 is using cache so it is possible that old theme css is still there in moodledata subfolders. You could try to purge all caches after Login from site administration > Development or clean theme cache from the top of Site administration >... > Theme selector page

It is also possible to delete subfolders of cache directly from your moodledata but usually people do this from site administration menu.

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

THANK YOU! 

It behaved really, really well for a while (in Chrome), until I got into adding users (so that my teachers can start putting content in), then it went back to no format.

If I look at it in Firefox, it seems to be behaving.  I've added a couple more teachers and things look right!!

 

THANK YOU!!!!

****SMOOCH****

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Lisa Thiessen -

Hmmm.  I've accidently re-created my problem. 

I installed the book mod, then refreshed the site (hit the 'upgrade' button)

ran a cron script,

et voila!  No theme.  refresh, then an error message (500), and still no theme. 

checked to see if it re-wrote my config.php file to include the www.  - but it didn't.

Installed game mod at same time, game mod did not work as it is not supported/out of date.

Any ideas?

TIA

Lisa

 

***EDIT*** did the 'purge all caches' thing...and now it's working without issue.  Thanks so much for haveing the forum here, giving thourough replies, and putting up with us noobs.

smile

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

When you install 3rd party activities to moodle 2.X the first thing to check is that download link is for moodle 2 (Download for Moodle 2.0) - links like "1.7 or later" or "Latest version" do not necessarely work in moodle 2.X...

The second thing to do is to check that files of 3rd party activities have gone to the correct folders, modules like book to mod folder etc and once you have clicked "Notifications" link in site administration menu moodle installs the activities - creates tables to database and so on.

And if something fails you usually need to do two things: remove the activity from activities list in site administration menu (to remove it from database) and remove the folder from mod (or from blocks if you installed a block).

Both book and game module should have a 2.X version - maybe the installation was just not finished (after pressing Notifications) ?

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

Hi Mauno!

Funny, but even with it being a 2.X version in games, it was listed as a `failed installation`after I pushed Notifications, and the book one went in again without issue.  I think it`s okay -  our teachers wanted it because it would be a fun way to present some of our material, but we can certainly do without it and present our material in other ways. It`s not such a big thing that I`m interested in troubleshooting it at this point.

Thanks, though!
smile 

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Lisa Thiessen -

Uh, sorry to bother people with this again...but the same problems that were showing up last time are beginning to show up again.  The teachers have reported that they've had the same experience of displaying with no theme (then in some cases being able to refresh until it displays right again)...and when I log in, it's not displaying all the little icons in the menu column - well, at least not predictably.

I can't seem to find the config.php file to check if thing are set up properly.  Should it be in admin?

TIA

Lisa 

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mauno Korpelainen -

Config.php is in the same folder as moodle itself...

but now your site is complaining that "YUI is not defined" with some yui_combo.php related error/file not found messages...that break css.

Did you change some default settings from Site administration > Appearance > AJAX and Javascript ? Or have there been some other changes on your site recently?

( These new errors look a little like http://moodle.org/mod/forum/discuss.php?d=182018 )

In reply to Mauno Korpelainen

Re: Moodle displays no theme

by Lisa Thiessen -

Thanks Mauno! That seems to have done it!

smile

(I had checked with each of the teachers to see if anyone had changed any settings, or anything else.  The link you gave provided the way to solve it.)

Cheers,

Lisa 

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Lisa Thiessen -

I hate to have to write this, but we're still having trouble.  I haven't been able to find where on the new install 2.0.4 the error logs are kept to show what's going on...can you point me in the right direction?

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Guillermo Madero -

Site administration > Reports > Logs

In reply to Guillermo Madero

Re: Moodle displays no theme

by Lisa Thiessen -

Thanks, found the logs.

Sorry, Guillermo, I should have been clearer...I'm looking for the error logs because this same issue has reared it's head again.  I don't know how to tackle it - but things are not consistently displaying with the theme.  I am not having problems, but several of the teachers are and many of the students are finding (even having never logged in before) that the site is displaying without theme.  

I've purged the site cache and helped users clear their own caches.  I did things (as best I can) from the previous recommendations, and each time have had a period of stability (it would seem).  

Do you have any other ideas what could cause this?

Thanks again for your time,

Lisa

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Lisa Thiessen -

figured out that incorrect address thing, sorry to bother you with that.  That one was a total rookie mistake.

In reply to Mary Evans

Re: Moodle displays no theme

by Lisa Thiessen -

Thanks, Mary.  I appreciate you looking at it.

smile

In reply to Lisa Thiessen

Re: Moodle displays no theme

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Lisa,

I have been watching this dicussion.

I am so pleased you got the help you needed.

Hope it keeps working the way it should.

Mary

In reply to Mary Evans

Re: Moodle displays no theme

by Lisa Thiessen -

:D

Thanks, Mary.  I appreciate you getting me over into the appropriate area to get that help.

Cheers!!
Lisa