Combination View Flat View Tree View
Threads [ Previous | Next ]
Anita Sahoo
Cannot remove liferay error message
December 20, 2013 2:28 AM
Answer

Anita Sahoo

Rank: New Member

Posts: 11

Join Date: September 17, 2013

Recent Posts

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.
Attachment

Attachments: forum.png (8.6k)
Zsolt Balogh
RE: Cannot remove liferay error message
December 20, 2013 5:58 AM
Answer

Zsolt Balogh

LIFERAY STAFF

Rank: Expert

Posts: 459

Join Date: March 23, 2009

Recent Posts

Hi Anita,

You can change the behavior in two different ways:
  1. You modify the liferay portlet by a hook and remove the line from the code where the message is printed.
  2. 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
Anita Sahoo
RE: Cannot remove liferay error message
December 26, 2013 3:43 AM
Answer

Anita Sahoo

Rank: New Member

Posts: 11

Join Date: September 17, 2013

Recent Posts

Thanks for ur reply Zsolt
I solved the issue by creating a hook as i had to completely remove tht error msg
Atti tude
RE: Cannot remove liferay error message
September 10, 2014 9:20 PM
Answer

Atti tude

Rank: New Member

Posts: 2

Join Date: August 27, 2014

Recent Posts

In which file you have removed that error message. give me path and file name.

Thanks in advance.
Manali Lalaji
RE: Cannot remove liferay error message
September 10, 2014 9:37 PM
Answer

Manali Lalaji

Rank: Expert

Posts: 308

Join Date: March 9, 2010

Recent Posts

Hi,

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

HTH!
Atti tude
RE: Cannot remove liferay error message
September 10, 2014 10:09 PM
Answer

Atti tude

Rank: New Member

Posts: 2

Join Date: August 27, 2014

Recent Posts

Thanks Manali emoticon emoticon
Jitendra Rajput
RE: Cannot remove liferay error message
September 12, 2014 11:04 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 709

Join Date: January 7, 2011

Recent Posts

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.
Manali Lalaji
RE: Cannot remove liferay error message
September 13, 2014 1:19 AM
Answer

Manali Lalaji

Rank: Expert

Posts: 308

Join Date: March 9, 2010

Recent Posts

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
RE: Cannot remove liferay error message
October 9, 2014 3:15 AM
Answer

Frederic REIS

Rank: New Member

Posts: 2

Join Date: May 11, 2009

Recent Posts

More simply, you can add the following code in the render or processAction method of the portlet. Tested on Liferay 6.2

1SessionMessages.add(request, PortalUtil.getPortletId(request) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);