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

Rewritten URLs are broken on staged/versioned pages

    Details

      Description

      • Setup a Site named Site1
      • Enable Local Live with Versioning on public pages
      • Add one page /home
      • Add this rule to ROOT/WEB-INF/urlrewrite.xml
        <rule>
        <name>test redirect to staged resource</name>
        <from>^/web/site1-staging/home/test.pdf(.*)$</from>
        <to>/web/site1-staging/home?p_p_id=testportlet_WAR_testportlet&amp;p_p_lifecycle=2&amp;p_p_resource_id=doSomething</to>
        </rule>
        
      • Restart the tomcat to reload the modified urlrewrite.xml
      • Access /web/site1-staging/home/test.pdf

      Expected: White screen
      Actual:

      java.lang.NullPointerException
              at com.liferay.portal.model.LayoutStagingHandler._getLayoutRevision(LayoutStagingHandler.java:149)
              at com.liferay.portal.model.LayoutStagingHandler.<init>(LayoutStagingHandler.java:123)
              at com.liferay.portal.model.LayoutStagingHandler.<init>(LayoutStagingHandler.java:55)
              at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.wrapLayout(LayoutLocalServiceStagingAdvice.java
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.jin Mark Jin (Inactive)
              Reporter:
              shinn.lok Shinn Lok (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 5 weeks, 6 days ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2