legacy-knowledge-base
公開されました Sep. 10, 2025

Theme Contributor Loads Multiple Times

written-by

Jose Bodega

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

learn-legacy-article-disclaimer-text

Issue

  • When deploying a Theme Contributor, it loads multiple times. The number of times varies depending on the website, page, and other factors.

Environment

  • Liferay DXP 7.0 and later

Resolution

  • Multiple calls to a Theme Contributor within a single page load is expected behavior. This is due to the lifecycle of widgets. Each widget executes the prepare() method, which can trigger the Theme Contributor multiple times.
    • Component Loading: When a page loads, various components, including widgets in the header, footer, and page body, are loaded independently.
    • Embedded Widgets and Portlets: The presence of embedded widgets and portlets within a page necessitates multiple calls to the Theme Contributor, as each embedded widget or portlet triggers the execution of prepare().
  • There's no standard configuration or mechanism within Liferay DXP to limit the number of times a Theme Contributor is called. It's inherently tied to the widget and portlet lifecycle.

Additional Information

NOTE: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.

did-this-article-resolve-your-issue

legacy-knowledge-base