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

Errors with Liferay.componentReady in asset-list-web

    Details

      Description

      Steps to reproduce the issue:

      1. Make sure you don't have this setting in your portal-ext.properties file

      javascript.single.page.application.enabled = false

      2. Edit modules/apps/asset/asset-list-web/src/main/resources/META-INF/resources/view.jsp

       

      Remove or comment the if "block" statement on lines 187-200, but leave the nested code

       

      <c:if test="<%= assetListDisplayContext.getAssetListEntriesCount() == 0 %>">
      Liferay.componentReady('emptyResultMessageComponent').then(
        function(emptyResultMessageComponent) {
          emptyResultMessageComponent.on(
            'itemClicked',
            function(event) {
              var itemData = event.data.item.data;
      
              if (itemData && itemData.action && ACTIONS[itemData.action]) {
                ACTIONS[itemData.action](event);
              }
            }
          );
        }
      );
      </c:if>
      

      So that it appears like this:

       

      Liferay.componentReady('emptyResultMessageComponent').then(
        function(emptyResultMessageComponent) {
          emptyResultMessageComponent.on(
            'itemClicked',
            function(event) {
              var itemData = event.data.item.data;
      
              if (itemData && itemData.action && ACTIONS[itemData.action]) {
                ACTIONS[itemData.action](event);
              }
            }
          );
        }
      );

      3. Start up liferay-portal

      4. Go to Content > Asset Lists

      5. Click on the "New" dropdown menu in the middle of the page

      6. Create a new asset list (manual or dynamic it doesn't matter)

      7. Type a value in the "modal" window (anything will do)

      8. Navigate back

      9. Delete the recently created asset list

      10. Click on the "New" dropdown menu to create a new asset list again

      11. An error occurs and you're unable to edit the name of the asset list in the modal window

      12. For reference this is the stacktrace:

      Modal.es.js:189 Uncaught RangeError: Maximum call stack size exceeded.
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      (anonymous) @ SimpleInputModal.es.js:74
      requestAnimationFrame (async)
      rendered @ SimpleInputModal.es.js:73
      informRendered @ Component.js:587
      cleanUpRender_ @ render.js:82
      render @ render.js:452
      (anonymous) @ core.js:133
      f @ core.js:100
      callPatch_ @ patch.js:56
      tryPatchWithNoParent_ @ patch.js:111
      patch @ patch.js:75
      patch @ IncrementalDomRenderer.js:162
      render @ IncrementalDomRenderer.js:182
      renderComponent @ Component.js:665
      Component @ Component.js:194
      PortletBase @ PortletBase.es.js:49
      SimpleInputModal @ SimpleInputModal.es.js:47
      openSimpleInputModal @ OpenSimpleInputModal.es.js:126
      addAssetListEntry @ manage?p_p_id=com_liferay_asset_list_web_portlet_AssetListPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_auth=JXmBcofG:1462
      (anonymous) @ manage?p_p_id=com_liferay_asset_list_web_portlet_AssetListPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_auth=JXmBcofG:1541
      runListeners_ @ EventEmitter.js:468
      emit @ ClayComponent.js:121
      _handleItemClick @ ClayDropdown.js:50
      runListeners_ @ EventEmitter.js:468
      emit @ ClayComponent.js:121
      _handleItemClick @ ClayDropdownBase.js:117
      triggerListeners_ @ domNamed.js:884
      triggerElementListeners_ @ domNamed.js:841
      triggerDelegatedListeners_ @ domNamed.js:735
      handleDelegateEvent_ @ domNamed.js:355
      7Modal.es.js:189 Uncaught RangeError: Maximum call stack size exceeded.
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      _autoFocus @ Modal.es.js:189
      _handleDocumentFocus @ Modal.es.js:215
      (anonymous) @ SimpleInputModal.es.js:74
      requestAnimationFrame (async)
      rendered @ SimpleInputModal.es.js:73
      informRendered @ Component.js:587
      cleanUpRender_ @ render.js:82
      render @ render.js:452
      (anonymous) @ core.js:133
      f @ core.js:100
      callPatch_ @ patch.js:56
      tryPatchWithNoParent_ @ patch.js:111
      patch @ patch.js:75
      patch @ IncrementalDomRenderer.js:162
      render @ IncrementalDomRenderer.js:182
      renderComponent @ Component.js:665
      Component @ Component.js:194
      PortletBase @ PortletBase.es.js:49
      SimpleInputModal @ SimpleInputModal.es.js:47
      openSimpleInputModal @ OpenSimpleInputModal.es.js:126
      addAssetListEntry @ VM1021:256
      (anonymous) @ VM1021:335
      runListeners_ @ EventEmitter.js:468
      emit @ ClayComponent.js:121
      _handleItemClick @ ClayDropdown.js:50
      runListeners_ @ EventEmitter.js:468
      emit @ ClayComponent.js:121
      _handleItemClick @ ClayDropdownBase.js:117
      triggerListeners_ @ domNamed.js:884
      triggerElementListeners_ @ domNamed.js:841
      triggerDelegatedListeners_ @ domNamed.js:735
      handleDelegateEvent_ @ domNamed.js:355
      13Modal.es.js:189 Uncaught RangeError: Maximum call stack size exceeded.
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      at Modal._autoFocus (Modal.es.js:189)
      at Modal._handleDocumentFocus (Modal.es.js:215)
      

       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 27 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP3
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master