Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-95387

Clicking on a widget in a mapped display page can break if you open it twice

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: Collaboration > Blogs
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Create a display page template
      2. Map the display page to a basic web content
      3. Add an asset publisher and a blogs widget to the template
      4. Add a blogs entry
      5. Add a web content that uses the display page template
      6. View the web content through the friendly URL
      7. Click on the blog entry in the asset publisher 
      8. Click on the blog entry in the blog widget

      Expected result:

      Blog doesn't break after clicking on it in its own portlet

      Actual result:

      When you click on the blog there is an internal server error that says an error occurred while accessing the requested resource. There is also an error in the console log:

      2019-05-10 12:00:03.119 WARN [http-nio-8080-exec-4][PortalImpl:6761] javax.servlet.ServletException: com.liferay.layout.page.template.exception.NoSuchPageTemplateEntryException: No LayoutPageTemplateEntry exists with the primary key 0
      javax.servlet.ServletException: com.liferay.layout.page.template.exception.NoSuchPageTemplateEntryException: No LayoutPageTemplateEntry exists with the primary key 0
      at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:953)
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:885)
      at com.liferay.taglib.servlet.PageContextWrapper.handlePageException(PageContextWrapper.java:173)
      at org.apache.jsp.layout.view.display_005fpage_jsp._jspService(display_005fpage_jsp:461)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      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:741)
      at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:319)
      at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:330)
      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:120)
      at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
      at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:162)
      at com.liferay.layout.type.controller.display.page.internal.controller.DisplayPageLayoutTypeController.includeLayoutContent(DisplayPageLayoutTypeController.java:167)
      at com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:885)
      at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:418)
      at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:174)
      at com.liferay.portal.struts.PortalRequestProcessor._process(PortalRequestProcessor.java:415)
      at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:155)
      at com.liferay.portal.internal.servlet.MainServlet.doGet(MainServlet.java:203)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
      at com.liferay.portal.internal.servlet.MainServlet.service(MainServlet.java:639)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
      at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:360)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
      at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:398)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:99)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:344)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:370)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:360)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:266)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:266)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
      at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
      at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:106)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.layout.page.template.exception.NoSuchPageTemplateEntryException: No LayoutPageTemplateEntry exists with the primary key 0
      at com.liferay.layout.page.template.service.persistence.impl.LayoutPageTemplateEntryPersistenceImpl.findByPrimaryKey(LayoutPageTemplateEntryPersistenceImpl.java:22103)
      at com.liferay.layout.page.template.service.persistence.impl.LayoutPageTemplateEntryPersistenceImpl.findByPrimaryKey(LayoutPageTemplateEntryPersistenceImpl.java:22122)
      at com.liferay.layout.page.template.service.base.LayoutPageTemplateEntryLocalServiceBaseImpl.getLayoutPageTemplateEntry(LayoutPageTemplateEntryLocalServiceBaseImpl.java:282)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:64)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
      at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:62)
      at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
      at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
      at com.sun.proxy.$Proxy1593.getLayoutPageTemplateEntry(Unknown Source)
      at com.liferay.layout.page.template.service.LayoutPageTemplateEntryLocalServiceUtil.getLayoutPageTemplateEntry(LayoutPageTemplateEntryLocalServiceUtil.java:545)
      at com.liferay.layout.type.controller.display.page.internal.display.context.DisplayPageLayoutTypeControllerDisplayContext.getStructureJSONArray(DisplayPageLayoutTypeControllerDisplayContext.java:174)
      at org.apache.jsp.layout.view.display_005fpage_jsp._jspService(display_005fpage_jsp:198)
      ... 136 more
      2019-05-10 12:00:03.290 ERROR [http-nio-8080-exec-4][status_jsp:?] com.liferay.layout.page.template.exception.NoSuchPageTemplateEntryException: No LayoutPageTemplateEntry exists with the primary key 0

      Note:

      The error does not occur if you click on the blog entry in the blog widget without first clicking on the blog entry in the asset publisher.

      Reproduced on:

      Tomcat 9.0.17 + MySQL 5.7.

      Portal Master GIT Commit: ff428661a09978a5c07f74af52412f0ee4fb8afb

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brooke.dalton Brooke Dalton
                Reporter:
                brooke.dalton Brooke Dalton
                Participants of an Issue:
                Recent user:
                Brooke Dalton
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  26 weeks, 5 days ago

                  Packages

                  Version Package
                  Master