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

Error when propagating changes from a Site Template to a Site when using Page Templates

Details

    Description

      Steps to reproduce:

      1. Create a new Page Template Test Page Template. Leave any checkbox checked.
      2. Create a new Site Template Test Site Template. Leave any checkbox checked.
      3. Edit Test Site Template and click Open site template to access its pages.
      4. Add a new page Test Page to Test Site Template based in the template Test Page Template.
      5. Go back to control panel and create a new Site Test Site based in the template Test Site Template. Leave all checkboxes checked (as by default) and make sure the option Copy As Public Pages is selected.
      6. Select Go to public pages to access the public pages of Test Site.
      7. Open Test Page in Test Site. You get a Not Found error message: "The requested resource was not found. http://localhost:8080/web/test-site/test-page". See attached screenshot.
      8. Reload the page. Now it works.
      9. Go to control panel > Page Templates and edit Test Page Template. Select Open Page Template and change the layout from 2 column to 3 column.
      10. Open Test Site again and go to Test Page. Once again you get the same error.

      In both 7. and 10. the server log shows this exception:

       
      09:43:54,564 ERROR [http-bio-8080-exec-27][MainServlet:413] com.liferay.portal.NoSuchLayoutException: No Layout exists with the primary key 10548
      com.liferay.portal.NoSuchLayoutException: No Layout exists with the primary key 10548
      	at com.liferay.portal.service.persistence.LayoutPersistenceImpl.findByPrimaryKey(LayoutPersistenceImpl.java:8492)
      	at com.liferay.portal.service.persistence.LayoutPersistenceImpl.findByPrimaryKey(LayoutPersistenceImpl.java:8509)
      	at com.liferay.portal.service.base.LayoutLocalServiceBaseImpl.getLayout(LayoutLocalServiceBaseImpl.java:394)
      	at sun.reflect.GeneratedMethodAccessor493.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      	at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:200)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:132)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:80)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:162)
      	at $Proxy27.getLayout(Unknown Source)
      	at com.liferay.portal.service.LayoutLocalServiceUtil.getLayout(LayoutLocalServiceUtil.java:181)
      	at com.liferay.portal.servlet.MainServlet.processGroupInactiveRequest(MainServlet.java:1058)
      

      This test case is the same as for LPS-31259 Site/page templates, changes in layout template doesn't propagate and it is reproduced in the test LayoutExportImportTest.testLSPLinkEnabledWithPageAdditionFromLPToLSPLinkEnabled(), which also fails with the same exception.

      Attachments

        Issue Links

          Activity

            People

              mark.jin Mark Jin (Inactive)
              eduardo.garcia Eduardo García (Inactive)
              Marta Elicegui Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10 years, 1 week, 3 days ago

                Packages

                  Version Package
                  6.2.0 CE M4