Search This Blog

Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Wednesday, September 11, 2013

Unable to download documents from Document Library

This is one of the showstopper issue which people face when they use Liferay 6.1.20 EE GA2 with SSH. and IE 8,7 as the browser. While it works on other browsers like Firefox.The documents from the document library are not available.

Reason:

When the server uses SSL (https os Secure Socket Layer). The apache adds the following to the http headers.

Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate


The IE Browser is  not allowed to store the document in the local system and thus it fails to download the object.

refer:
response.setHeader( HttpHeaders.CACHE_CONTROL, HttpHeaders.CACHE_CONTROL_PUBLIC_VALUE);

present in the classes ServletResponseUtil, PortletResponseUtil.

Here is a link to the microsoft support , which explains the browser issue .
http://support.microsoft.com/default.aspx?scid=kb;en-us;316431

Solution:

Solution 1. Override the code of the classes ServletResponseUtil, PortletResponseUtil. in the setHeaders(request, response, fileName, contentType) method.

                           (or)

solution 2. Add the following line to the apache config file.


        Header unset Pragma

This will remove the pragma entry from the header and the issue would be solved. 






Tuesday, July 30, 2013

SAP Error Codes

The SAP native error codes during its integration with other technologies are always difficult to understand.. Here is a possible list of standard SAP Error Codes

/**********************************************************************/

/* Standard error codes.                                              */

/**********************************************************************/


ECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECodeECode



Wednesday, July 24, 2013

Form re submission of/on Page Reload Errror

The property 'action-url-redirect' must be added to the liferay-portlet.xml file. This will not allow the form to be re submitted once the page is refreshed after a form submission is already done.




By default the property is false and thus the form resubmission occurs

Display error and success messages in liferay

Error Display Many times we need to display the errors messages or the success messages on the jsp pages.The way it is done is the following. Add the following the your implementation of processAction.
 //for Errors 
    com.liferay.portal.kernel.servlet.SessionErrors.add(portletRequest, "unique-error-key"); 
//for Messages 
    com.liferay.portal.kernel.servlet.SessionMessages.add(portletRequest, "unique-message-key"); 
or In Language_xx.properties add your custom message in this file like this
unique-message-key2="Success"

 TO display them in your jsp use this:

Friday, July 19, 2013

How to remove the message you-have-entered-invalid-data

There are several ways to remove the message from displaying. This message is present in the portal at the following path :-

   html\taglib\ui\error\end.jsp   


To remove the display use any of the following mentioned approach:

1. Using HOOK for all portlets :create a hook and edit the end.jsp file. In which you can comment out the lines , then the message will not be displayed for any of the portlets in  Liferay.

2. Using HOOK for specific portlet: create a hook and edit the end.jsp file. Use the portletId to show/hide the message display.


 


3. Masking with Custom Message in Portlet :
Change that message key in your portlet's language.properties file with your custom text.
Like, in the language_en.properties file for your custom portlet. add the custom message to the key:

   you-have-entered-invalid-data=Server Error: Please try again. 


4. Using CSS property:
Hook the file end.jsp (at html\taglib\ui\error\end.jsp ) with a surrounding CSS.


in the custom CSS of your portlet add

   .portlet-msg-error-invalid-data-show-hide{
     display : none;
   }

My Blog List