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

Commented out define produces "Mismatched anonymous define() module"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.6
    • JavaScript
    • MOODLE_36_STABLE

      A minor issue and only happens in developer mode where the minified js is not run.

      The define comment in lib/amd/src/sortable_list.js will cause a mismatch anonymous define() error in the console log if a plugin is using jquery in an old way such as

       

      $PAGE->requires->jquery();
      $PAGE->requires->js(new moodle_url('/admin/tool/someplugin/code.js'));
      

       It seems that even though the define is in a comment the regex that finds the defines doesn't take comments into account.

      I'm not sure that anything needs to be done here. Hopefully any developers that hit this problem will find this issue.

            Unassigned Unassigned
            abgreeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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