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

Warning $PAGE->context was not set in course/management.php

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Administration, Course
    • Labels:
    • Testing Instructions:
      Hide
      1. In a terminal start watching your apache logs
      2. In a browser log in as admin
      3. Browse to the course management interface
      4. Expand a category by clicking its plus icon (triggering an ajax action)
      5. Check you don't get a set context error appear in the error log.
      Show
      In a terminal start watching your apache logs In a browser log in as admin Browse to the course management interface Expand a category by clicking its plus icon (triggering an ajax action) Check you don't get a set context error appear in the error log.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      42277-26
    • Pull Master Diff URL:

      Description

      During testing MDL-42020 I noticed few warnings. I think it was when I was purging cache but I can't reproduce.

      [Fri Oct 11 11:25:05 2013] [error] [client 127.0.0.1] Debugging: Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result<ul style="text-align: left" data-rel="backtrace"><li>line 451 of /lib/pagelib.php: call to debugging()</li><li>line 1465 of /lib/pagelib.php: call to moodle_page->magic_get_context()</li><li>line 1538 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 42 of /course/ajax/management.php: call to bootstrap_renderer->__call()</li><li>line 42 of /course/ajax/management.php: call to bootstrap_renderer->header()</li></ul>, referer: http://jerome.moodle.local/m/integration_master/course/management.php?categoryid=2

      Just writing this issue in case you want to have a look around course management the code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samhemelryk Sam Hemelryk
              Reporter:
              jerome Jérôme Mouneyrac
              Integrator:
              Dan Poltawski Dan Poltawski
              Tester:
              Andrew Lyons Andrew Lyons
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13