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

NullPointerException is thrown when trying to modify an imported Content Page from an imported Site Template

    Details

      Description

      Description

      After importing a Site Template that contains a Content Page with a Page Fragment, attempting to modify the imported Content Page results with a thrown NullPointerException.

      Steps to Reproduce

      1. Startup Liferay 7.1
      2. Navigate to: Control Panel > Sites > Site Templates
        1. Click [+] to add a new Site Template
          1. Name: Test Site Template
          2. Click Save
        2. For the created Test Site Template
          1. Click the Options icon > Manage
      3. Navigate to Test Site Template > Build > Page Fragments
        1. Click New > Collection
          1. Name: Test Collection
          2. Click Save
        2. Click [+] to add a new fragment to Test Collection
          1. Name: Test Fragment
          2. Click Save
        3. Replace content in HTML box with: foobar
        4. Click Publish
      4. Navigate to Test Site Template > Build > Pages
        1. Click the [+] button to create a new page
          1. Select Content Page
            1. Name: Test Page
            2. Click Save
        2. Click the [+] button to add a new Fragment to Test Page
          1. Click Test Collection
          2. Click [+] next to the Test Fragment
          3. Notice the text "foobar" is now visible on the page
      5. Navigate to: Control Panel > Sites > Site Templates
        1. Click the options icon on the top right of the page
        2. Click Export / Import
        3. Click Export
        4. Download Exported lar file
        5. Close the Export/Import screen
      6. Navigate to: Control Panel > Sites > Site Templates
        1. Delete the created Test Site Template
        2. Click the options icon on the top right of the page
        3. Click Export / Import
        4. Click Import
        5. Click Select File
        6. Select the exported lar file
        7. Click Continue
        8. Click Import
        9. Close the Export/Import screen
      7. Navigate to: Control Panel > Sites > Site Templates
        1. For the imported Test Site Template
          1. Click the Options icon > Manage
        2. For the Test Page
          1. Click the Options icon > Edit

      Expected Result
      The page editor shows for the selected page

      Actual Result
      The page shows an error and a NullPointerException is thrown.

      Page Error

      Content Page Editor is temporarily unavailable.
      

      Stack trace

      2018-10-19 01:03:00.222 ERROR [http-nio-8080-exec-10][PortletRequestDispatcherImpl:306] Unable to dispatch request: java.lang.NullPointerException
      2018-10-19 01:03:00.223 ERROR [http-nio-8080-exec-10][PortletServlet:112] javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
      javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
          at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:308)
          at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:128)
          ...
          at com.liferay.portal.servlet.TransferHeadersHelperImpl$TransferHeadersRequestDispatcher.include(TransferHeadersHelperImpl.java:163)
          at com.liferay.layout.type.controller.content.internal.controller.ContentLayoutTypeController.includeLayoutContent(ContentLayoutTypeController.java:146)
          at com.liferay.portal.model.impl.LayoutImpl.includeLayoutContent(LayoutImpl.java:904)
          at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:407)
          ...
      Caused by: org.apache.jasper.JasperException: java.lang.NullPointerException
          ...
          ... 200 more
      Caused by: java.lang.NullPointerException
          at com.liferay.layout.type.controller.content.internal.display.context.FragmentsEditorDisplayContext._getSoyContextFragmentEntryLinks(FragmentsEditorDisplayContext.java:431)
          at com.liferay.layout.type.controller.content.internal.display.context.FragmentsEditorDisplayContext.getFragmentEntryLinkListContext(FragmentsEditorDisplayContext.java:174)
          at org.apache.jsp.view_jsp._jspService(view_jsp.java:220)
          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)
          ... 210 more
      2018-10-19 01:03:00.260 ERROR [http-nio-8080-exec-10][render_portlet_jsp:131] null
      java.lang.NullPointerException
          at com.liferay.layout.type.controller.content.internal.display.context.FragmentsEditorDisplayContext._getSoyContextFragmentEntryLinks(FragmentsEditorDisplayContext.java:431)
          at com.liferay.layout.type.controller.content.internal.display.context.FragmentsEditorDisplayContext.getFragmentEntryLinkListContext(FragmentsEditorDisplayContext.java:174)
          at org.apache.jsp.view_jsp._jspService(view_jsp.java:220)
          ...
      

        Attachments

          Activity

            People

            • Assignee:
              lu.liu Lu Liu
              Reporter:
              eric.yan Eric Yan
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                51 weeks, 6 days ago

                Packages

                Version Package
                7.1.1 CE GA2
                7.1.10 DXP FP4
                7.1.10.1 SP1
                7.1.X
                Master