-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.17, 3.11.10, 4.0.4, 4.1
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
This is really unlikely to happen... until it happens!
Was installing a test site from scratch (via web) using an old config.php... and then, trying to install any current Moodle version (3.11.x, 4.0.x, 4.1dev...) I was getting, consistently this error:
Coding error detected, it must be fixed by a programmer: Attempt to get the course category for this page before the course was set.
|
Debug info:
|
Error code: codingerror
|
Stack trace:
|
line 2005 of /lib/pagelib.php: coding_exception thrown
|
line 2042 of /lib/pagelib.php: call to moodle_page->ensure_category_loaded()
|
line 546 of /lib/pagelib.php: call to moodle_page->ensure_categories_loaded()
|
line 953 of /lib/pagelib.php: call to moodle_page->magic_get_categories()
|
line 1792 of /lib/pagelib.php: call to moodle_page->__get()
|
line 1695 of /lib/pagelib.php: call to moodle_page->resolve_theme()
|
line 751 of /lib/pagelib.php: call to moodle_page->initialise_theme_and_output()
|
line 997 of /lib/pagelib.php: call to moodle_page->magic_get_theme()
|
line 229 of /admin/index.php: call to moodle_page->get_renderer()
|
Debugging the problem I discovered that this $CFG setting was causing the error:
$CFG->allowcategorythemes = true; // This breaks installation.
And, commenting it out, installation worked without problems.
As said, it's unlikely people is going to install Moodle with that setting enabled but, still, it shouldn't happen (at some level in the stack-trace above we have to stop looking to allow install to work normally).
Ciao
PS: I've not tested CLI install, maybe it has the same problem!