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

NPE is thrown when access to a web content without associated display page through friendly URL

    Details

      Description

      Step to reproduce:

      1. Add a web content without associated display page
      2. Access to the web content through display page friendly URL

      Expected Results:
      The requested resource could not be found. should be shown.

      Actual Results:
      The page is empty. Additionally, the following NPE is thrown in console.

      2022-01-18 07:04:43.907 ERROR [http-nio-8080-exec-10][I18nFilter:62] java.lang.NullPointerException
      java.lang.NullPointerException: null
              at com.liferay.portal.service.permission.LayoutPermissionImpl.contains(LayoutPermissionImpl.java:141) ~[portal-impl.jar:?]
              at com.liferay.portal.service.permission.LayoutPermissionImpl.contains(LayoutPermissionImpl.java:161) ~[portal-impl.jar:?]
              at com.liferay.portal.kernel.service.permission.LayoutPermissionUtil.contains(LayoutPermissionUtil.java:72) ~[portal-kernel.jar:?]
              at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.getRedirect(FriendlyURLServlet.java:187) ~[?:?]
              at com.liferay.friendly.url.internal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:414) ~[?:?]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet-api.jar:4.0.FR]
              at com.liferay.portal.servlet.ServletAdapter.service(ServletAdapter.java:98) ~[portal-impl.jar:?]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[servlet-api.jar:4.0.FR]
              at com.liferay.shielded.container.internal.proxy.ServletWrapper.service(ServletWrapper.java:113) ~[com.liferay.shielded.container.impl.jar:?]
      

      Reproduced on:
      Tomcat 9.0.56 + MySQL 5.7. Portal master GIT ID: ff82ec64faca207c6d69d7b421be9d2002ad94bf.

      Cannot be reproduced on:
      Tomcat 9.0.56 + MySQL 5.7. Portal 7.4.13-DXP-U4.

        Attachments

          Activity

            People

            Assignee:
            jeremy.chen Jeremy Chen
            Reporter:
            yang.cao Yang Cao
            Participants of an Issue:
            Recent user:
            Rafaela Nascimento
            Engineering Assignee:
            Alicia Garcia
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              18 weeks, 4 days ago

                Packages

                Version Package
                7.3.X
                7.4.3.9 CE GA9
                Master