Legacy Knowledge Base
Published Jul. 2, 2025

On content pages with no widgets, 'AllPortletsReady' should be triggered

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • If a fragment is created with javascript that uses the following JS:
    • Liferay.on ('allPortletsReady', function() { console.log('Hello from allPortletsReady');}); , and the content page has a portlet, the fragment will work as intended.
    • However, the fragment fails if there is a content page with no portlets since 'allPortletsReady' is never fired.
    • Note: Deploy the following custom theme no-style-theme.war, and apply the theme to the site pages

Environment

  • Liferay DXP 7.2

Resolution

  • The described behavior is considered as a product improvement, not a bug.
    As a result, a Feature Request ticket has been created and can be followed here to request that the AllPortletsReady state be fired even on Content Pages that don't have any portlets. 

Additional Information

  • As the request progresses, it can be monitored and checked on. The status of the request will change to 'complete' if the Product Team approves it and the feature is implemented, after which a ticket can be submitted to seek a hotfix. In the meantime, one can follow the ticket and vote for this feature by clicking on 'Vote for this issue'.
  • Users can use the workaround of adding a lightweight portlet to a theme that can be used for Content Pages or just adding an unused portlet to Content Pages to ensure that the allPortletsReady is triggered as planned.
Did this article resolve your issue ?

Legacy Knowledge Base