Closed michael-milette closed 9 years ago
Hello Michael,
Thanks for the update. Surely we will update this in our next version.
Thanks and Regards, parthaJeet~
Just seen this error on our test Moodle 2.9 installation. Do you know what the fix is, or roughly when your next version is being released?
Hello Paul,
Yes, we will fix this in our next version.
Thanks, parthaJeet~
If my current theme is set to 'clean' and I have enabled the option of specifying the theme name in the URL using the ?theme=crisp syntax, I get the following error in Moodle 2.7:
I've tracked down the problem to the following lines in layout/header.php:
$PAGE->requires->js('/theme/'.$CFG->theme.'/javascript/font.js'); $PAGE->requires->js('/theme/'.$CFG->theme.'/lemmon-Lemmon-Slider/lemmon-slider.js'); $PAGE->requires->js('/theme/'.$CFG->theme.'/javascript/crispy.js');
Turns out that $CFG-theme does not reflect the name of the displayed theme when using the URL to override it.
For now, I've replaced '.$CFG->theme.' with crisp which allows the theme to work however you have used the same technique for many of the images in the theme which will also need to be fixed.
If you don't want to hard code the theme name, I would suggest declaring a variable and assigning it the theme name. Then you could use the variable throughout your code without worrying about what might happen if you change it.
Alternatively, I think you can get the current theme name by using the following code:
Best regards,