Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72920

Web install breaks @ debug_footer_html()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 4.0
    • 4.0
    • Installation
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72920-master
    • Hide
      1. Create a new instance of moodle using a manual install
      2. As soon as the config.php is created, likely after setting up the database, add full debugging:
        $CFG->debugdisplay = 1;
        $CFG->debug = (E_ALL | E_STRICT);
      3. Verify there are no errors during the install
      Show
      Create a new instance of moodle using a manual install As soon as the config.php is created, likely after setting up the database, add full debugging: $CFG->debugdisplay = 1; $CFG->debug = (E_ALL | E_STRICT); Verify there are no errors during the install

      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

            basbrands Bas Brands
            stronk7 Eloy Lafuente (stronk7)
            Amaia Anabitarte Amaia Anabitarte
            Victor Déniz Falcón Victor Déniz Falcón
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 31 minutes
                6h 31m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.