-
Type:
Bug
-
Status: Closed
-
Resolution: Inactive
-
Affects Version/s: 6.2.X EE, 7.0.X EE
-
Fix Version/s: Master
-
Component/s: WCM
-
Labels:
-
Story Points:1
-
Fix Priority:4
-
Git Pull Request:
-
What problem did the customer find?:
-
What do you think is the root cause? (if known):
-
Proposed solution (if any):An exception should be thrown instead of the current behavior, with a "Not found" error on the page.
Steps to reproduce @ master & 7.0.x
- Start Master bundle.
- Click on the "Menu button" (Sidebar will be opened on the left side).
- Activate the menu of "Public Pages" section and click on the "Add Public Page".
- Fill the name section and click on the "Add Page" button.
- Activate the new page's menu and click on the "Configure Page".
- Activate the "Options" menu on the top of the right side and click on the "Delete"
- Confirm this deletion.
- Click on the Browser's Back button
Actual result
17:31:31,408 ERROR [http-nio-8080-exec-8][IncludeTag:128] Current URL /liferay-portal/group/guest/~/control_panel/manage?p_p_id=com_liferay_layout_admin_web_portlet_GroupPagesPortlet&p_p_lifecycle=0&p_p_state=maximized&p_r_p___selPlid=34623&_com_liferay_layout_admin_web_portlet_GroupPagesPortlet_groupId=20140&p_p_auth=KqSYbtUt generates exception: java.lang.NullPointerException java.lang.NullPointerException at org.apache.jsp.edit_005flayout_jsp._jspService(edit_005flayout_jsp:414) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:413) at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:424) at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153) at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62) at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117) at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48) at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53) at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:372) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:349) at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:202) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:86)
Steps to reproduce @ 6.2.x
- Start portal
- Go to Admin/Pages
- Create a page
- Select the page and delete it
- Click on the Browser's Back button
Actual result
11:24:06,042 ERROR [http-bio-8080-exec-9][render_portlet_jsp:132] null
com.liferay.portal.NoSuchLayoutException: No Layout exists with the primary key 20503
at com.liferay.portal.service.persistence.LayoutPersistenceImpl.findByPrimaryKey(LayoutPersistenceImpl.java:10568)
at com.liferay.portal.service.persistence.LayoutPersistenceImpl.findByPrimaryKey(LayoutPersistenceImpl.java:10586)
at com.liferay.portal.service.base.LayoutLocalServiceBaseImpl.getLayout(LayoutLocalServiceBaseImpl.java:339)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:81)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:141)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:65)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.liferay.portal.service.LayoutLocalServiceUtil.getLayout(LayoutLocalServiceUtil.java:230)
at com.liferay.portlet.layoutsadmin.action.EditLayoutsAction.checkPermissions(EditLayoutsAction.java:408)
at com.liferay.portlet.layoutsadmin.action.EditLayoutsAction.render(EditLayoutsAction.java:313)
at com.liferay.portal.struts.PortletAction.execute(PortletAction.java:119)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at com.liferay.portal.struts.PortletRequestProcessor.processActionPerform(PortletRequestProcessor.java:454)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:234)
Expected behavior
Catching the exception and redirection to the Site Pages with a 'Not found' error message.
Additional information
In master and 7.0.x, the doDispatch method of LayoutAdminPortlet, while in 6.2.x the EditLayoutsAction needs to be modified. Therefore the original solution and the backport will differ from each other.
- Testing discovered
-
LPS-73783 Exception during going back in the browser history
- Closed