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

Exporting a site that includes a missing Layout UUID fails

    Details

      Description

      Steps to Reproduce:

      1. Create a couple of pages: Page1, Page2.
      2. In Page1 add a Web Content Display and select as scope Page1 (add new).
      3. In Page2 add a Web Content Display and select as scope Page2 (add new).
      4. Add an Asset Publisher to Page 1.
      5. Configure in previous Asset Publisher Page 1 and Page 2 as scopes.
      6. Remove Page2.
      7. Try to export the site.

       
      Actual Results:

      The export fails throwing an exception like the following one:

      Caused by: com.liferay.portal.kernel.exception.NoSuchLayoutException: No Layout exists with the key {uuid=e0eaa466-fe2d-3d06-8f3a-76064f6dfa5c, groupId=20124, privateLayout=false, head=false}
      	at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.findByUUID_G_P_Head(LayoutPersistenceImpl.java:2334)
      	at com.liferay.portal.service.impl.LayoutLocalServiceImpl.getLayoutByUuidAndGroupId(LayoutLocalServiceImpl.java:1327)
      	at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice$LayoutLocalServiceStagingInvocationHandler._invoke(LayoutLocalServiceStagingAdvice.java:786)
      	at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice$LayoutLocalServiceStagingInvocationHandler.invoke(LayoutLocalServiceStagingAdvice.java:668)
      	at com.sun.proxy.$Proxy244.getLayoutByUuidAndGroupId(Unknown Source)
      	at sun.reflect.GeneratedMethodAccessor455.invoke(Unknown Source)
      	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.invoke(TransactionInterceptor.java:69)
      	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.$Proxy115.getLayoutByUuidAndGroupId(Unknown Source)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor._getExportScopeId(AssetPublisherExportImportPortletPreferencesProcessor.java:1330)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.updateExportScopeIds(AssetPublisherExportImportPortletPreferencesProcessor.java:960)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.updateExportPortletPreferences(AssetPublisherExportImportPortletPreferencesProcessor.java:930)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.processExportPortletPreferences(AssetPublisherExportImportPortletPreferencesProcessor.java:154)
      

       Expected Results:

      There should be no exceptions thrown. At much just a log info as when the group doesn't exist.

       

      As of now, the best way to test it in master is execute steps 1-6 in 7.2 and afterwards perform an upgrade, since scope layouts can' be assigned due to LPS-104832.

        Attachments

          Activity

            People

            Assignee:
            joyce.wang Joyce Wang
            Reporter:
            mariano.alvaro Mariano Álvaro
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP94
                7.0.10.15 DXP SP15
                7.0.X
                7.1.10 DXP FP19
                7.1.10.5 SP5
                7.1.X
                7.2.10 DXP FP7
                7.2.X
                7.3.4 CE GA5
                7.3.10 DXP GA1
                Master