留言板

Cannot remove liferay error message

thumbnail
Anita Sahoo,修改在10 年前。

Cannot remove liferay error message

New Member 帖子: 13 加入日期: 13-9-17 最近的帖子
Hi all,
I am unable remove the liferay by default error message "Your request failed to complete". I want to remove only the first error message and want the seconnd one
So plz help if anebody knows the solution .Thanks in advance.
thumbnail
Zsolt Balogh,修改在10 年前。

RE: Cannot remove liferay error message

Expert 帖子: 463 加入日期: 09-3-23 最近的帖子
Hi Anita,

You can change the behavior in two different ways:
  • You modify the liferay portlet by a hook and remove the line from the code where the message is printed.
  • Hiding the error message by CSS


I would not recommend the first one as it'd be harder to maintain, I would only choose that one if the message would cause information leaking (I guess it's not the case).

For the second one, you just need to find the CSS path for the first message and adding the CSS to the portlet's look and feel section or adding it to the theme. In this case, the message still would be in the code, however it would be hidden from the users.

Zsolt
thumbnail
Anita Sahoo,修改在10 年前。

RE: Cannot remove liferay error message

New Member 帖子: 13 加入日期: 13-9-17 最近的帖子
Thanks for ur reply Zsolt
I solved the issue by creating a hook as i had to completely remove tht error msg
Atti tude,修改在9 年前。

RE: Cannot remove liferay error message

New Member 帖子: 2 加入日期: 14-8-28 最近的帖子
In which file you have removed that error message. give me path and file name.

Thanks in advance.
thumbnail
Manali Lalaji,修改在9 年前。

RE: Cannot remove liferay error message

Expert 帖子: 362 加入日期: 10-3-9 最近的帖子
Hi,

The error message comes from - html/taglib/ui/error/end.jsp

HTH!
Atti tude,修改在9 年前。

RE: Cannot remove liferay error message

New Member 帖子: 2 加入日期: 14-8-28 最近的帖子
Thanks Manali emoticon emoticon
thumbnail
Jitendra Rajput,修改在9 年前。

RE: Cannot remove liferay error message

Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
The error message comes from - html/taglib/ui/error/end.jsp


This is common tag lib JSP if you do any changes in this file it will affect all portlet . Instead you can check for JSP of specific portlet to hide error messages.
thumbnail
Manali Lalaji,修改在9 年前。

RE: Cannot remove liferay error message

Expert 帖子: 362 加入日期: 10-3-9 最近的帖子
Jitendra Rajput:
The error message comes from - html/taglib/ui/error/end.jsp


This is common tag lib JSP if you do any changes in this file it will affect all portlet . Instead you can check for JSP of specific portlet to hide error messages.



Yes thats right Jitendra. Overriding above jsp with hook and removing message shall be affecting entire portal. But it depends on user's requirement whether they want it for entire portal or not.
If they want it to be applicable to specific portlet, they can check for specific portlet using portlet Id.
Frederic REIS,修改在9 年前。

RE: Cannot remove liferay error message

New Member 帖子: 2 加入日期: 09-5-11 最近的帖子
More simply, you can add the following code in the render or processAction method of the portlet. Tested on Liferay 6.2

SessionMessages.add(request, PortalUtil.getPortletId(request) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
thumbnail
Kiran Yalavali,修改在8 年前。

RE: Cannot remove liferay error message

Regular Member 帖子: 175 加入日期: 14-10-15 最近的帖子
Hi Anitha,


How to remove that error message in custom portlet,

please help me.