-
Bug
-
Resolution: Fixed
-
Blocker
-
4.0
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-72920-master -
Haven't looked deeply but this seems to be a regression from MDL-71965 (new footer).
To reproduce:
- create empty database.
- point config.php to it.
- go to the site main page.
Expected:
- the install license page is shown.
Problem:
- Various notices and an error happen, here it's the stack trace.
Exception - has_capability(): Argument #2 ($context) must be of type context, null given, called in [dirroot]/lib/outputrenderers.php on line 875
|
Debug info:
|
Error code: generalexceptionmessage
|
Stack trace:
|
line 427 of /lib/accesslib.php: TypeError thrown
|
line 875 of /lib/outputrenderers.php: call to has_capability()
|
line 219 of /lib/mustache/src/Mustache/Context.php: call to core_renderer->debug_footer_html()
|
line 138 of /lib/mustache/src/Mustache/Context.php: call to Mustache_Context->findVariableInStack()
|
line 94 of ... /moodle_data_git_testplan/localcache/mustache/1/boost/__Mustache_51bee0a45f1292b645b1ac1a122da47c.php: call to Mustache_Context->findDot()
|
line 106 of .../moodle_data_git_testplan/localcache/mustache/1/boost/__Mustache_dfce56019a816f58d0c00700c7449497.php: call to __Mustache_51bee0a45f1292b645b1ac1a122da47c->renderInternal()
|
line 67 of /lib/mustache/src/Mustache/Template.php: call to __Mustache_dfce56019a816f58d0c00700c7449497->renderInternal()
|
line 198 of /lib/outputrenderers.php: call to Mustache_Template->render()
|
line 34 of /theme/boost/layout/maintenance.php: call to renderer_base->render_from_template()
|
line 1421 of /lib/outputrenderers.php: call to include()
|
line 1351 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
|
line ? of unknownfile: call to core_renderer->header()
|
line 500 of /lib/outputrenderers.php: call to call_user_func_array()
|
line 49 of /admin/renderer.php: call to plugin_renderer_base->__call()
|
line 224 of /admin/index.php: call to core_admin_renderer->install_licence_page()
|
Mini-research results:
In stables… when standard_footer_html() is called… it checks for during_initial_install() and returns quick (before trying to play with contexts and capabilities).
But in master… it seems that there is a template that calls to the new debug_footer_html() … and that function isn’t protected by during_initial_install(). Hence, crash.
Ciao
- is a regression caused by
-
MDL-71965 New footer
-
- Closed
-