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

AMD modules loaded bye YUI on pageload lead to duplicate requirejs loads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      1. Create a new glossary with autolinking enabled
      2. Add a new glossary entry
      3. Enable the Glossary filter
      4. Add some text to the course page to show the glossary link
      5. View the dev tools => Network tab, and reload the page
        1. Note: first.js loaded
        2. Note: event.js loaded

      I'd hazard a guess that requirejs is loading first.js async in the background at the time that event.js is loaded, and as a result event.js is also fetched.

      Ideally requirejs needs to only load -lazy items, but I don't think that's possible. We may have to change the requirejs loader to load first.js sync so that it blocks but that's not a great solution either.

      https://moodle.org/mod/forum/discuss.php?d=377578#p1559908

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: