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

Error using webservices since Moodle 2.9 (erroroptionalparamarray)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.9
    • Web Services
    • MOODLE_29_STABLE

      Hello,

      Here is an error that appeared with Moodle 2.9, consuming its webservices:

      Moodle: 32877907 - The web service description parameter named 'userid' is an single or multiple structure. It can not be set as VALUE_OPTIONAL. Check web service description. | ERRORCODE: erroroptionalparamarray

      The following error have been reported using RosarioSIS Moodle integrator:

      Moodle integrator: error message from Moodle when trying to add a new subject

      But also here on the forums: Developing a Web Service; Required Web Parameter missing even though it isn't declared? , XML-RPC Protocol problem

      I myself confirm the error. Here are my remarks:

      The message is unclear as it states the parameter userid even when the webservice function called does not need it.
      The problem does not seem to be XML-RPC related but apparently affects all protocols.
      The first mention of the problem I have found dates back from April 29.
      It is pretty clear that the error is thrown here.

      Related issue: MDL-46054 (see commits, it seems that every webservice function must be updated with DEFAULT instead of OPTIONAL!)

            stronk7 Eloy Lafuente (stronk7)
            francoisj François J.
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.