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

Custom fields delete action causes an error message when handler is setup with "uses categories" = false.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.2
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
      None

      Description

      When a custom fields handler returns false for \core_customfield\handler::uses_categories

      trying to delete a custom field using the \core_customfield\output\management interface causes the following error.

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

      It appears the \core_customfield_external::reload_template_returns it looking for a PARAM_INT but \core_customfield\handler::uses_categories returns PARAM_BOOL

        Attachments

          Activity

            People

            Assignee:
            pholden Paul Holden
            Reporter:
            booped Darren Brown
            Participants:
            Component watchers:
            Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: