Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-33723

CLONE - Sorting paths for javascript modules disrupts the execution state if there are dependencies in a comboURL

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: 6.2.0 CE M5
    • Labels:
      None

      Description

      On the response, modules were being loaded in dependency order.

      Preparation:

      Since we need to test that module dependency is preserved via comboURL, we are attempting to load the 'autocomplete-plugin' module, and beforehand load it's two immediate dependency modules: 'node-pluginhost' & 'autocomplete-list'.

      Go ahead and open these three files, and put a unique alert or console log at the top of their files.

      autocomplete-list.js
      node-pluginhost.js
      autocomplete-plugin.js
      1. Start Portal
      2. Create a New Page named Test
      3. Navigate to Test
      4. open browser console
      5. execute the following statement: AUI({}).Get.script('http://localhost:8080/combo/?p=/html/js/aui&m=/autocomplete-list/autocomplete-list.js&m=/node-pluginhost/node-pluginhost.js&m=/autocomplete-plugin/autocomplete-plugin.js');

      Notes:

      autocomplete-plugin requires the 'node-pluginhost' & 'autocomplete-list' modules.
      If you need to run this step multiple times, refresh the page first.
      An alternative way to reproduce this is just to paste that url into a new tab and inspect the order of files that appear.
      Result:

      these three modules will load in reverse-sorted dependency order. that is:

      The order:
      1. autocomplete-plugin
      2. node-pluginhost
      3. autocomplete-list

      The expected behavior order:
      1. autocomplete-list
      2. node-pluginhost
      3. autocomplete-plugin

      If autocomplete-list and node-pluginhost don't come before auto-completeplugin, the dependency chain is broken.

      Note about the previous fix:
      previously, modules were returned in reverse alphabetical order. Now, that we are no longer abc-sorting the list, they still appear in reverse order will still break dependency chain in some scenarios like this test.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marc.lundgren Marc Lundgren (Inactive)
                Reporter:
                marc.lundgren Marc Lundgren (Inactive)
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 23 weeks ago

                  Packages

                  Version Package
                  6.2.0 CE M5