Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Richard Gibson
"Your request failed to complete."
July 6, 2011 8:18 AM
Answer

Richard Gibson

Rank: Junior Member

Posts: 30

Join Date: February 19, 2010

Recent Posts

Does anyone know of a way to turn off the standard
"Your request failed to complete." message when the SessionErrors object is not empty?
I've added the following init parameters:

1       
2<init-param>
3    <name>add-process-action-success-action</name>
4    <value>false</value>
5</init-param>


I was hoping there would be a setting something like 'add-process-action-failure-action' but there doesn't seem to be.

Thanks
Rob Hall
RE: "Your request failed to complete."
July 20, 2012 12:28 PM
Answer

Rob Hall

Rank: Junior Member

Posts: 47

Join Date: November 30, 2011

Recent Posts

I have also been looking for a solution for this. We tried CSS, but it had negative side affects. Adding hooks for pre- and post- login events doesn't help, those don't seem to be invoked in an login failure scenario. I've been looking to see if there is a portal property I can set to suppress this message, but haven't found anything.
Jay Patel
RE: "Your request failed to complete."
July 20, 2012 12:57 PM
Answer

Jay Patel

Rank: Regular Member

Posts: 119

Join Date: February 23, 2010

Recent Posts

Rob Hall:
I have also been looking for a solution for this. We tried CSS, but it had negative side affects. Adding hooks for pre- and post- login events doesn't help, those don't seem to be invoked in an login failure scenario. I've been looking to see if there is a portal property I can set to suppress this message, but haven't found anything.


Hook for Pre & Post Login only invoked when before & after successful login. It is not invoked at all for failed login. Try using "servlet.service.events.pre" in hook, which will be invoked every time any action is called. In hook you can create your custom action calls which overrides "com.liferay.portal.kernel.events.Action" class of Liferay.

-Jay.
Hitoshi Ozawa
RE: "Your request failed to complete."
July 20, 2012 8:32 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Have you checked the following lps?

http://issues.liferay.com/browse/LPS-23008
Ben Carson
RE: "Your request failed to complete."
August 2, 2012 9:25 AM
Answer

Ben Carson

Rank: Junior Member

Posts: 25

Join Date: January 9, 2012

Recent Posts

Hitoshi Ozawa:
Have you checked the following lps?

http://issues.liferay.com/browse/LPS-23008


@Hitoshi
Thanks for the link. I want to supplement it by mentioning that you can create a PortletConfig object with the following lines of code:

1import com.liferay.portal.kernel.util.JavaConstants;

...
1
2PortletConfig portletConfig = (PortletConfig)req.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
3SessionMessages.add(req,  portletConfig.getPortletName() + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);


I had to look up how to create this object, so I just wanted to share with others in case they were struggling as well.

Ben
Atin Agarwal
RE: "Your request failed to complete."
October 25, 2012 11:11 PM
Answer

Atin Agarwal

Rank: Junior Member

Posts: 86

Join Date: February 19, 2012

Recent Posts

PortletConfig portletConfig = (PortletConfig)request.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
SessionMessages.add(request, portletConfig.getPortletName() + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);

Not working in Custom portlets.
I have tried this in hooks. It Worked perfectly.
However when i have tried this in my Custom portlet's Process Action it didn't worked..I wonder Why??
Any help wud be appreciated.


Regards
Katalina Marcos
RE: "Your request failed to complete."
April 15, 2013 11:30 AM
Answer

Katalina Marcos

Rank: New Member

Posts: 1

Join Date: September 10, 2012

Recent Posts

SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
Sean Gildea
RE: "Your request failed to complete."
June 12, 2013 10:54 AM
Answer

Sean Gildea

Rank: New Member

Posts: 4

Join Date: December 15, 2012

Recent Posts

Here's a solution for those using Portlets and not hooks. Insert this JQuery code at the top of your JSP page to hide that particular DIV. Make sure you have the JQuery library before you include this.

1<script>$(".portlet-msg-error:contains('Your request failed to complete.')").hide();</script>
Hu Jun
RE: "Your request failed to complete."
July 28, 2013 11:42 PM
Answer

Hu Jun

Rank: New Member

Posts: 2

Join Date: April 19, 2012

Recent Posts

From my point of view, you could write a hook to overwrite portlet_messages.jspf file and remove related code
1
2<c:if test='<%= SessionMessages.contains(renderRequest, "request_processed") %>'>
3   <div class="portlet-msg-success">
4   ....
5   </div>
6</c:if>

or the bottom of common error information.
dfgdfg dfgdfg
RE: "Your request failed to complete."
October 2, 2014 2:37 AM
Answer

dfgdfg dfgdfg

Rank: New Member

Posts: 1

Join Date: January 10, 2014

Recent Posts

Thank you!