Fórumok

"Your request failed to complete."

thumbnail
Richard Gibson, módosítva 12 év-val korábban

"Your request failed to complete."

Junior Member Bejegyzések: 30 Csatlakozás dátuma: 2010.02.19. Legújabb bejegyzések
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:

        
<init-param>
    <name>add-process-action-success-action</name>
    <value>false</value>
</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, módosítva 11 év-val korábban

RE: "Your request failed to complete."

Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2011.11.30. Legújabb bejegyzések
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.
thumbnail
Jay Patel, módosítva 11 év-val korábban

RE: "Your request failed to complete."

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzések
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.
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: "Your request failed to complete."

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
Have you checked the following lps?

http://issues.liferay.com/browse/LPS-23008
thumbnail
Ben Carson, módosítva 11 év-val korábban

RE: "Your request failed to complete."

Junior Member Bejegyzések: 25 Csatlakozás dátuma: 2012.01.09. Legújabb bejegyzések
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:

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

...

PortletConfig portletConfig = (PortletConfig)req.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
SessionMessages.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
thumbnail
Atin Agarwal, módosítva 11 év-val korábban

RE: "Your request failed to complete."

Junior Member Bejegyzések: 86 Csatlakozás dátuma: 2012.02.20. Legújabb bejegyzések
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, módosítva 11 év-val korábban

RE: "Your request failed to complete."

New Member Bejegyzés: 1 Csatlakozás dátuma: 2012.09.10. Legújabb bejegyzések
SessionMessages.add(actionRequest, PortalUtil.getPortletId(actionRequest) + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
thumbnail
sean gildea, módosítva 10 év-val korábban

RE: "Your request failed to complete."

New Member Bejegyzések: 20 Csatlakozás dátuma: 2012.12.15. Legújabb bejegyzések
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.

<script>$(".portlet-msg-error:contains('Your request failed to complete.')").hide();</script>
dfgdfg dfgdfg, módosítva 9 év-val korábban

RE: "Your request failed to complete."

New Member Bejegyzés: 1 Csatlakozás dátuma: 2014.01.10. Legújabb bejegyzések
Thank you!
Hu Jun, módosítva 10 év-val korábban

RE: "Your request failed to complete."

New Member Bejegyzések: 2 Csatlakozás dátuma: 2012.04.20. Legújabb bejegyzések
From my point of view, you could write a hook to overwrite portlet_messages.jspf file and remove related code

<c:if test="<%= SessionMessages.contains(renderRequest, &quot;request_processed&quot;) %>">
   <div class="portlet-msg-success">
   ....
   </div>
</c:if>

or the bottom of common error information.
thumbnail
Andrew Jardine, módosítva 7 év-val korábban

RE: "Your request failed to complete."

Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
I know that this is an old thread, but just incase anyone comes along, I thought I might share how I am solving this. I got tired of writing a hook to remove code. Typically, I create my own base Portlet class for my projects -- and that base portlet extends the MVCPortlet. All the custom portlets that I create extend from y base Portlet class that I have defined which means that during processing I can have common render functions in the base Portlet. In this case I always want to suppress the default failure message for all my custom portlets so in the base Portlet class for my solution I do the following --

    @Override
    public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException
    {
        try
        {
            long companyId = PortalUtil.getCompanyId(renderRequest);

            com.liferay.portal.model.Portlet portlet = PortletLocalServiceUtil.getPortletById(companyId, "YOUR PORTLET ID HERE");

            SessionMessages.add(request, portlet.getPortletId() + SessionMessages.KEY_SUFFIX_HIDE_DEFAULT_ERROR_MESSAGE);
        }
        catch( Exception e )
        {
            // ignore exception
        }

        super.render(request, response);
    }


and voila! If you wanted to make it optional per portlet, you could also use the same model that Liferay has by adding this init parameter --


        <init-param>
            <name>add-process-action-general-error-action</name>
            <value>false</value>
        </init-param>


and then using the portlet object, get the init params and check for it. I don't need that -- for the moment anyway so I am just forcing all error to be scrapped. Just thought i'd share