I Changed My Theme Now Nobody can log back into Moodle

I Changed My Theme Now Nobody can log back into Moodle

by Mark Jones -
Number of replies: 6

Moodle Version:      3.7 
Chrome Version:     77.0.3865.120 (Official Build) (64-bit)
Operating System:  Windows 10 Professional
Theme Changed:     CLEAN to MOOVE

Dear Fellow Moodlers. 

ISSUE EXPERIENCED

When working with my Moodle platform the other day, I made the decision to change the look and feel through Themes (using defaults no custom changes made).  When the theme was applied changing from "CLEAN" to "MOOVE" the system kicked and locked me out of the platform and refuses to let any staff members back in to it.  

Previously both of these themes worked without fault.  Now I have a major dilemma nobody can login.  

Fortunately my organisation takes Server Snapshots, so I asked a member of the Data Centre team to reinstate the Moodle platforms previously created snapshot to a time when everything was working perfectly (Friday last week).  However, over the weekend I build two courses, which are residing in a new snapshot but I cannot login to Moodle to recover them.  

I have since asked for a new server space to host Moodle under an LMSDEV web address so that I have two environments, one for checking things out to make sure they work before uploading them in to the live system for staff consumption. 

The LMSDEV address is using the snapshot which broke, as I am hoping to login to this new environment and recover the courses I made over the weekend.   However, what I need to know is has anyone ever experienced being locked out of Moodle which authenticates its users by AD as a result of changing the theme? and if so what did you do to fix the issue? Also can you advise me of things to check out?

Many thanks in advance

Mark Jones

Average of ratings: -
In reply to Mark Jones

Re: I Changed My Theme Now Nobody can log back into Moodle

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

The first thing I would have done was to turn on debugging in the config file and see if any error messages pulled up.  If this didn't clear something up, then I would have gone into my MoodleData folder and deleted out the cache and localcache folder.  If I still couldn't get in, then I would have deleted the theme in question from the themes folder in the moodle code and moodle should then revert to a default theme and presumably let you back in.  

Once back in, a suggestion would be to allow theme changes by url - that way you could always change the theme on the fly and see if that is actually the issue...

In reply to Mark Jones

Re: I Changed My Theme Now Nobody can log back into Moodle

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Clean theme in Moodle 3.7???

Ok, change the theme name in the DB (probably the config table) and then delete the 'localcache' folder in the moodledata folder.

In reply to Mark Jones

Re: I Changed My Theme Now Nobody can log back into Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Put this line in moodle/config.php:
$CFG->theme='boost';
Average of ratings: Useful (1)
In reply to Mark Jones

Re: I Changed My Theme Now Nobody can log back into Moodle

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Have you tried deleting your Cache as there may be something stopping the Login page working correctly?

Is your site available online to anyone? If so can you post a link?

Thanks
Mary
Average of ratings: Useful (1)
In reply to Mary Evans

Re: I Changed My Theme Now Nobody can log back into Moodle

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Mary

It is definitely worth digging into. We had a couple of such incidents with MoodleBox - happened twice to me. The first time was vicious. Since the architecture was less familiar, ARM on Raspberry Pi, and especially the SD storage, I first thought the SD was damaged.
- https://discuss.moodlebox.net/d/121-can-t-login-to-moodlebox
- https://discuss.moodlebox.net/d/118-performance-deteriorated-a-second-time
In reply to Mark Jones

Re: I Changed My Theme Now Nobody can log back into Moodle

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers
There was an issue when Moodle required a "login token" and many themes didn't have it implemented and many sites lost the ability to login. It is possible that you had an outdated version of Moove and it didn't have the login token code present in the theme. Deleting the Moove theme from your server and then deleting the Cache folder in moodledata should cause Moodle to revert back to default Boost. This will have the proper login token and work for logins.

There was also a Config.php hack you could use to bypass the login token but I cannot remember what is was.

A search in the theme forum for "login token" might benefit you.