Fórum

Cannot remove liferay error message

thumbnail
Anita Sahoo, modificado 10 Anos atrás.

Cannot remove liferay error message

New Member Postagens: 13 Data de Entrada: 17/09/13 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Cannot remove liferay error message

Expert Postagens: 463 Data de Entrada: 23/03/09 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Cannot remove liferay error message

New Member Postagens: 13 Data de Entrada: 17/09/13 Postagens Recentes
Thanks for ur reply Zsolt
I solved the issue by creating a hook as i had to completely remove tht error msg
Atti tude, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

New Member Postagens: 2 Data de Entrada: 28/08/14 Postagens Recentes
In which file you have removed that error message. give me path and file name.

Thanks in advance.
thumbnail
Manali Lalaji, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

Expert Postagens: 362 Data de Entrada: 09/03/10 Postagens Recentes
Hi,

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

HTH!
Atti tude, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

New Member Postagens: 2 Data de Entrada: 28/08/14 Postagens Recentes
Thanks Manali emoticon emoticon
thumbnail
Jitendra Rajput, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
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, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

Expert Postagens: 362 Data de Entrada: 09/03/10 Postagens Recentes
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, modificado 9 Anos atrás.

RE: Cannot remove liferay error message

New Member Postagens: 2 Data de Entrada: 11/05/09 Postagens Recentes
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, modificado 8 Anos atrás.

RE: Cannot remove liferay error message

Regular Member Postagens: 175 Data de Entrada: 15/10/14 Postagens Recentes
Hi Anitha,


How to remove that error message in custom portlet,

please help me.