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

Errors with loading the Site Administration menu item

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Perform with DEBUG_DEVELOPER both set, and unset.

      • Install the attached local plugin
      • View a non-site admin page (so that it will be loaded by AJAX)
      • Expand the site administration navigation
        • Confirm that there were no errors
      Show
      Perform with DEBUG_DEVELOPER both set, and unset. Install the attached local plugin View a non-site admin page (so that it will be loaded by AJAX) Expand the site administration navigation Confirm that there were no errors
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-44014-master

      Description

      In the settings_navigation_ajax->initialise() method, the $this->context is not set like in the parent method. This causes a problem once settings_navigation->load_local_plugin_settings is called and $this->context is passed to local plugins which then pass it to capability methods. The capability methods throw exceptions if the context is null.

      In addition, ajax_check_captured_output is a little sensitive as it prevented the admin menu from opening because of a single space character. Usually these characters are a result of a space after a ?> tag. Due to the size of Moodle, these are almost impossible to find. Let's have ajax_check_captured_output trim the buffer so it only errors out when something substantial is printed.

        Attachments

        1. 44014.zip
          1 kB
        2. MDL-44014.patch
          0.9 kB

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              bushido Mark Nielsen
              Peer reviewer:
              Sam Hemelryk
              Integrator:
              Marina Glancy
              Tester:
              Ankit Agarwal
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14