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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Administration, Course
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • 42277-26
    • 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.

    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

              samhemelryk Sam Hemelryk
              jerome Jérôme Mouneyrac
              Dan Poltawski Dan Poltawski
              Andrew Lyons Andrew Lyons
              Andrew Lyons, 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:
                18/Nov/13