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

AJAX admin menu JSON parse error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6.1
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide

      *Log in as admin

      • With debug_developer disabled
      • Expand admin menu
        • Confirm that it was opened correctly
      • Enable debug_Developer
      • Refresh the page
      • Expand admin menu
        • Confirm that it was opened correctly
      • Edit theme/splash/settings.php and add a leading character or something else invalid
      • With debug_developer enabled
      • Expand admin menu
        • Confirm that an error message was displayed
      • Disable debug_developer
      • Refresh the page
      • Expand the admin menu
        • Confirm that it was opened correctly
      Show
      *Log in as admin With debug_developer disabled Expand admin menu Confirm that it was opened correctly Enable debug_Developer Refresh the page Expand admin menu Confirm that it was opened correctly Edit theme/splash/settings.php and add a leading character or something else invalid With debug_developer enabled Expand admin menu Confirm that an error message was displayed Disable debug_developer Refresh the page Expand the admin menu Confirm that it was opened correctly
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      MDL-42989-master

      Description

      There is a lack of error handling in /lib/ajax/getsiteadminbranch.php which causes the JSON parser to easily fail if (for example) whitespace is output before the JSON.

      -> Update to Moodle 2.6
      -> Try to load the admin menu on the home page

      It fails on our build, with a JSON parser error.
      It should expand the admin menu.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              skylarkelty Skylar Kelty
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Dan Poltawski
              Tester:
              Rossiani Wijaya
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Jan/14