gjbarnard / moodle-theme_foundation

Foundation theme for Moodle.
GNU General Public License v3.0
8 stars 0 forks source link

Call to undefined function course_get_format() on login #8

Closed Luckasas closed 3 years ago

Luckasas commented 3 years ago

Please don't close the issue: With last version it shows the error: "Call to undefined function course_get_format()" if you login "https://www.myserver.com/moodle/login/index.php"

I'm sorry but I think that my server is ok. I've installed a new Moodle in a new server and it happens again. A non modified Moodle with only your theme crashes when you "Log in". I attach the video where you can see it. It only happens with your theme.

Gravació de pantalla 2020-10-08 a les 0.55.59.zip

gjb2048 commented 3 years ago

Ok, very, very odd:

Exception - Call to undefined function course_get_format() Debug info: Error code: generalexceptionmessage Stack trace:

line 4357 of \lib\outputrenderers.php: Error thrown
line 62 of \theme\foundation\classes\output\core_renderer_toolbox.php: call to core_renderer->context_header_settings_menu()
line 32 of \theme\foundation\layout\layout.php: call to theme_foundation\output\core_renderer->render_page()
line 1374 of \lib\outputrenderers.php: call to include()
line 1304 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
line 1945 of \lib\setuplib.php: call to core_renderer->header()
line 367 of \login\index.php: call to bootstrap_renderer->__call()
gjb2048 commented 3 years ago

@Luckasas And thanks for the report, sorry I did not believe you the first time.

Luckasas commented 3 years ago

Thanks to you for your theme, your patience and spent your time in Open Source. It's fantastic!

Luckasas commented 3 years ago

I've tried the new version and now it works perfect!

gjb2048 commented 3 years ago

Thanks @Luckasas - it was a case that I had a contributed plugin installed that required the course format lib.php and thus that function before my theme code kicked in, thus something I did not spot.

gjb2048 commented 3 years ago

I'll do an updated release soon.

gjb2048 commented 3 years ago

Released: https://moodle.org/mod/forum/discuss.php?d=411646&parent=1661008