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

Exception thrown when I try to unfold Site news in Navigation block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Navigation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Hi Sam,

      Koen discovered an issue in the Navigation block. Reproduce:
      1. go to Front page setting and let Site news being displayed at the Front page
      2. being logged-in, Site news appears as expandeable element in Site pages node
      3. when you try to unfold Site news, you got JSON.response error. Firebug reports:

      Notice: Undefined index: site in /home/mudrd8mz/public_html/moodle-head/lib/navigationlib.php  on line 1178
       
      Catchable fatal error: Argument 2 passed to global_navigation::load_course_sections() must be an instance of navigation_node, null given, called in /home/mudrd8mz/public_html/moodle-head/lib/navigationlib.php on line 1894 and defined in /home/mudrd8mz/public_html/moodle-head/lib/navigationlib.php on line 1204

      I have an idea. It seems to me that when this AJAX call is done, it does not use the user's session and therefore rootnodes['site'] is unset. Note that is you try to put print_object(); die(); into line 1178, you will get what is expected. But $rootnodes['site'] is not set when called by AJAX.

      Hope this helps.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: