dbnschools / moodle-theme_fordson

Theme for Moodle 3.3+
43 stars 40 forks source link

"Undefined property" errors: Fordson theme breaks Moodle display #43

Closed luisdev closed 6 years ago

luisdev commented 6 years ago

When I add the Fordson theme to my Moodle Windows Server 2012 R2 site (which runs on IIS 8.5, SQL Server 2016 and the $CFG->dbtype = 'sqlsrv' driver) the Moodle display is broken completely.

See: https://moodle.org/mod/forum/discuss.php?d=371544#p1523377 https://moodle.org/mod/forum/discuss.php?d=371544#p1524234

Moodle: $version = 2018051702.00; $release = '3.5.2 (Build: 20180910)';

Fordson theme: $plugin->version = 2018101700; $plugin->release = 'Moodle 3.5 Fordson v3.5 release 3 update 13';

When I have the Moodle Debugging level set to DEVELOPER errors like these are everywhere and the Moodle display is totally 'broken' (none of the .css is rendered):

[01-Nov-2018 08:33:40 Etc/GMT-2] PHP Notice: Undefined property: stdClass::$enhancedmydashboard in D:\Moodle\theme\fordson\config.php on line 80

[01-Nov-2018 08:33:40 Etc/GMT-2] PHP Notice: Undefined property: stdClass::$blockdisplay in D:\Moodle\theme\fordson\config.php on line 88 [01-Nov-2018 08:33:40 Etc/GMT-2] PHP Notice: Undefined property: stdClass::$blockdisplay in D:\Moodle\theme\fordson\config.php on line 101 [01-Nov-2018 08:33:40 Etc/GMT-2] PHP Notice: Undefined property: stdClass::$blockdisplay in D:\Moodle\theme\fordson\config.php on line 125 [01-Nov-2018 08:33:40 Etc/GMT-2] PHP Notice: Undefined property: stdClass::$blockdisplay in D:\Moodle\theme\fordson\config.php on line 131

Other Moodle Themes display correctly on that server.

dbnschools commented 6 years ago

Typically these might occur when you do not save a variable in the theme admin page. The property should be set there. I replied in the moodle forum you might want to uninstall and then reinstall via the web browser to make sure it saves all the Fordson Admin settings.

luisdev commented 6 years ago

See the comments by Gareth J Barnard on https://moodle.org/mod/forum/discuss.php?d=371544#p1524280. Can you apply that fix?

dbnschools commented 6 years ago

I am going to recommend you uninstall and reinstall from the web interface. Or switch to Boost as your main theme and then go into the Fordson Admin tabs and make sure you save all the settings once again because it is missing a setting. This will solve the issue. Then clear all caches and switch back to Fordson.