Foren

Cannot remove liferay error message

thumbnail
Anita Sahoo, geändert vor 10 Jahren.

Cannot remove liferay error message

New Member Beiträge: 13 Beitrittsdatum: 17.09.13 Neueste Beiträge
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, geändert vor 10 Jahren.

RE: Cannot remove liferay error message

Expert Beiträge: 463 Beitrittsdatum: 23.03.09 Neueste Beiträge
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, geändert vor 10 Jahren.

RE: Cannot remove liferay error message

New Member Beiträge: 13 Beitrittsdatum: 17.09.13 Neueste Beiträge
Thanks for ur reply Zsolt
I solved the issue by creating a hook as i had to completely remove tht error msg
Atti tude, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

New Member Beiträge: 2 Beitrittsdatum: 28.08.14 Neueste Beiträge
In which file you have removed that error message. give me path and file name.

Thanks in advance.
thumbnail
Manali Lalaji, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi,

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

HTH!
Atti tude, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

New Member Beiträge: 2 Beitrittsdatum: 28.08.14 Neueste Beiträge
Thanks Manali emoticon emoticon
thumbnail
Jitendra Rajput, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
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, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
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, geändert vor 9 Jahren.

RE: Cannot remove liferay error message

New Member Beiträge: 2 Beitrittsdatum: 11.05.09 Neueste Beiträge
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, geändert vor 8 Jahren.

RE: Cannot remove liferay error message

Regular Member Beiträge: 175 Beitrittsdatum: 15.10.14 Neueste Beiträge
Hi Anitha,


How to remove that error message in custom portlet,

please help me.