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

Cannot export/import the Global site between vanilla Liferays with mirror strategy due to duplicate layout page template

    Details

      Description

      Steps to reproduce:

      1. Start up a new Liferay.
      2. Go to the Global site > Publishing > Export and create a new export process.
      3. Select only "Pages" to export.
      4. Download the lar file
      5. Start up another Liferay (or create a new instance and sign into it).
      6. Go to the Global site > Publishing > Import and create a new import process.
      7. Import with mirror (or mirror with overwriting) strategy.
        Expected: The import process finishes correctly.
        Observed: The import process fails due to a duplicate layout template. Clicking on "Show More Details" shows the message:

        An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
        The Layout Page Template Entry Search could not be imported because of the following error: Duplicate layout page template for group 39248 with name Search.

        The complete stack trace is:

        2019-03-01 12:10:07.915 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:173] Unable to execute background task
        com.liferay.exportimport.kernel.lar.PortletDataException: Duplicate layout page template for group 39248 with name Search
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:433)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:456)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.GroupPagesPortletDataHandler.doImportData(GroupPagesPortletDataHandler.java:191)
        	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:383)
        	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:415)
        	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:346)
        	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.importSitePortlets(StagedGroupStagedModelDataHandler.java:599)
        	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:319)
        	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:78)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:456)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
        	at com.liferay.exportimport.internal.controller.LayoutImportController.doImportFile(LayoutImportController.java:580)
        	at com.liferay.exportimport.internal.controller.LayoutImportController.importFile(LayoutImportController.java:220)
        	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:219)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
        	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
        	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
        	at com.sun.proxy.$Proxy152.importLayouts(Unknown Source)
        	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:110)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:128)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:114)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
        	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
        	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:85)
        	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
        	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
        	at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:75)
        	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:132)
        	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
        	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
        	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
        	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
        	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
        	at java.lang.Thread.run(Thread.java:748)
        Caused by: com.liferay.layout.page.template.exception.DuplicateLayoutPageTemplateEntryException: Duplicate layout page template for group 39248 with name Search
        	at com.liferay.layout.page.template.service.impl.LayoutPageTemplateEntryLocalServiceImpl.validate(LayoutPageTemplateEntryLocalServiceImpl.java:721)
        	at com.liferay.layout.page.template.service.impl.LayoutPageTemplateEntryLocalServiceImpl.addLayoutPageTemplateEntry(LayoutPageTemplateEntryLocalServiceImpl.java:125)
        	at com.liferay.layout.page.template.service.impl.LayoutPageTemplateEntryLocalServiceImpl.addLayoutPageTemplateEntry(LayoutPageTemplateEntryLocalServiceImpl.java:106)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
        	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
        	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:46)
        	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
        	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
        	at com.sun.proxy.$Proxy1016.addLayoutPageTemplateEntry(Unknown Source)
        	at com.liferay.layout.admin.web.internal.exportimport.staged.model.repository.LayoutPageTemplateEntryStagedModelRepository.addStagedModel(LayoutPageTemplateEntryStagedModelRepository.java:60)
        	at com.liferay.layout.admin.web.internal.exportimport.staged.model.repository.LayoutPageTemplateEntryStagedModelRepository.addStagedModel(LayoutPageTemplateEntryStagedModelRepository.java:36)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutPageTemplateEntryStagedModelDataHandler.doImportStagedModel(LayoutPageTemplateEntryStagedModelDataHandler.java:247)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutPageTemplateEntryStagedModelDataHandler.doImportStagedModel(LayoutPageTemplateEntryStagedModelDataHandler.java:53)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
        	... 45 more
        

      Note: This cannot be reproduced in 7.0.x.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maria.kispal Mária Kispál (Inactive)
                Reporter:
                ricardo.couso Ricardo Couso
                Participants of an Issue:
                Recent user:
                Brian Wulbern
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.1.3 CE GA4
                  7.1.10 DXP FP11
                  7.1.X
                  Master