Moodle only working when default theme is set in config.php

Moodle only working when default theme is set in config.php

by Nicolas John -
Number of replies: 6
Dear all,

upfter an update from Moodle 3.8 to now 4.3 the website is only shown when the default theme is set in config.php. As a hack that's fine but I would like to be able to choose the default theme in the backend again. Can I set the default theme somewhere via PHPMyAdmin?

The error message I'm getting when the default theme is not set in config.php is:

GET /lib/ajax/service-nologin.php?info=core_output_load_template_with_dependencies,core_output_load_template_with_dependencies,core_output_load_template_with_dependencies&cachekey=1707229161&args=%5B%7B%22index%22%3A0%2C%22methodname%22%3A%22core_output_load_template_with_dependencies%22%2C%22args%22%3A%7B%22component%22%3A%22core%22%2C%22template%22%3A%22modal%22%2C%22themename%22%3A%22boost_campus%22%2C%22lang%22%3A%22de%22%7D%7D%2C%7B%22index%22%3A1%2C%22methodname%22%3A%22core_output_load_template_with_dependencies%22%2C%22args%22%3A%7B%22component%22%3A%22core%22%2C%22template%22%3A%22modal_backdrop%22%2C%22themename%22%3A%22boost_campus%22%2C%22lang%22%3A%22de%22%7D%7D%2C%7B%22index%22%3A2%2C%22methodname%22%3A%22core_output_load_template_with_dependencies%22%2C%22args%22%3A%7B%22component%22%3A%22core%22%2C%22template%22%3A%22pix_icon_fontawesome%22%2C%22themename%22%3A%22boost_campus%22%2C%22lang%22%3A%22de%22%7D%7D%5D HTTP/1.0

and a 500 status error. So it seems there's no default theme set.

Any help is appreciated and thanks in advance!
Average of ratings: -
In reply to Nicolas John

Re: Moodle only working when default theme is set in config.php

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
There was a huge UX change between those two versions - chances are the theme you were using is no longer compatible...
In reply to Nicolas John

Re: Moodle only working when default theme is set in config.php

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
If its a 500 error, then check the PHP log for more information.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Moodle only working when default theme is set in config.php

by Nicolas John -
Hey Gareth,

thanks for your reply. To specify: I want to use the current default theme but if I don't harcode it in the config.php, I'm just getting a blank page. The error message I see in the PHP log is the one I posted in my original post. So it seems that the moodle system doesn't know which theme to use as standard and is only to use the one I hardcode in the config.php. Is there a way to set a theme as default through the database via PHPMyAdmin?

Thanks and Regards,
Nicolas
In reply to Nicolas John

Re: Moodle only working when default theme is set in config.php

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Could you try and remove the boost campus theme files? (Back them up first!)
Average of ratings: Useful (1)
In reply to Nicolas John

Re: Moodle only working when default theme is set in config.php

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Also the theme can be set in the DB, it's in the 'config' table.
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Moodle only working when default theme is set in config.php

by Nicolas John -
That did the trick! Thanks a lot! smile