Legacy Knowledge Base
Published Jul. 2, 2025

Which is the correct place for Liferay to automatically display an error message ?

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

  • The error message that appears in a widget whenever the user wants to launch an error, sometimes the message appears at the bottom of the page and others at the top. For example, the same portlet twice in a row generates the message in two different places.

Environment

  • Liferay DXP 7.1

Resolution

  • The tag <liferay-ui:error> is configurable in several aspects and one of them is the position or the way in which the message is displayed which is controlled by the attribute  embed
    • When it  embedhas the value  true(by default), the message is displayed in the same place where the tag was invoked.
    • When it  embedhas the value  false (for example:)  ​<liferay-ui:error embed="<%= false %>" key="error401" message="error401"/>, the message is displayed floating down to the left. 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base