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

AllPortletsReady should trigger on Content pages without any widgets

    Details

    • Type: Feature Request
    • Status: Aligned with Roadmap
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JS APIs and Utilities
    • Labels:
      None

      Description

      Context

      Client is building a fragment with javascript that uses Liferay.on('allPortletsReady', ...). They're seeing that if the content page has a portlet on the page, the fragment works as expected. However, if there is a content page without any portlets on it, the fragment fails since "allPortletsReady" is never fired. 

      Request
      The allPortletsReady needs to fire on a content page whether there is a portlet on the page or not. This is the only way to allow consistency in the fragment javascript to operate on a page where there may or may not be a portlet.

      Steps to Reproduce

      1. Create a fragment with the following JS:
        Liferay.on('allPortletsReady', function() { console.log('Hello from allPortletsReady');});
      2. Create a new content page without any portlets (not even search bar, nav, etc) and put the fragment on the page.
      3. Deploy the following custom theme no-style-theme.war and apply the theme to the site pages
        The Classic Theme has portlets included in the theme that prevent a successful reproduction of the issue.
      4. Log out of portal and view the content page.
      5. Check the console output
        Expected Result: The "Hello from allPortletsReady" is displayed in the console.
        Actual Result: No message is displayed in the console.

      If you add a widget to the content page and check the console output again, you can see the AllPortletsReady message.

      Testing

      Branch – Reproduced

      Master – N/A

      • Customer's custom theme was not deployable on master.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              katlyn.lee Katlyn Anissa Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package