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

Bad default for defaulteventcontext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as admin
      2. Make sure you have guest access to your site.
      3. Add Calendar block to site home
      4. Log off
      5. View current month and log in as GUEST
      6. Try to navigate month
      7. Make sure you don't get the error mentioned below.
      Show
      Login as admin Make sure you have guest access to your site. Add Calendar block to site home Log off View current month and log in as GUEST Try to navigate month Make sure you don't get the error mentioned below.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60608-master

      Description

      The current default for defaulteventcontext is null. This leads to:

      defaulteventcontext => Invalid response value detected: Invalid external api response: the value is "", the server was expecting "int" type
      Error code: invalidresponse
      * line 424 of /lib/externallib.php: invalid_response_exception thrown
      * line 233 of /lib/externallib.php: call to external_api::clean_returnvalue()
      * line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
      

      Apparently null is not a valid int.

      Personally I'd say that this is a bug in the WS, and that an optional value should accept null as a default.

      This is seen by:

      1. Login as admin
      2. Add Calendar block to site home
      3. Log off
      4. View current month and log in as GUEST
      5. Try to navigate month

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/Nov/17