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

Form validation: M.core is undefined

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 3.9.1
    • Fix Version/s: None
    • Component/s: Forms Library
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      Running 3.9.1 and checked against a vanilla install. Using latest Firefox.

      I'm seeing this => Uncaught TypeError: M.core is undefined
      Which stems from the form validation JS, and in particular line 2529 of lib/formslib.php.
      It's trying to listen to the M.core.event.FORM_SUBMIT_AJAX event but looks like this has never been registered.

      If I wrap in:
      Y.use(\'moodle-core-event\', function() { ... });
      Then it disappears (stole that idea from line 2496).

      An example form where you can see this appear in the console is when you try to add a service from admin/tool/oauth2/issuers.php.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            xantico-simon Simon Lewis
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: