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

Default Wiki page cannot be imported when importing a LAR with "Mirror" strategy

    Details

      Description

      When importing a LAR containing the "Main" (initial) Wiki page from a different site, and the current site still has the "Main" page, using the default "Mirror" import strategy will cause the import to fail with a DuplicateNodeNameException.

      Steps to reproduce:
      1. Start up DXP
      2. Create two new sites, SiteA and SiteB
      3. In SiteA, go to Control Panel > Content > Wiki and add a new wiki with a new page
      4. From Content > Wiki, export a LAR of the Wiki content
      5. In SiteB, go to Content > Wiki and import the LAR file (keep the default "Mirror" import strategy)
      Expected Behavior: The LAR file imports successfully
      Actual Behavior: LAR import fails with the errors below:

      17:18:57,900 WARN  [liferay/background_task-1][PortletImportBackgroundTaskExecutor:96] Unable to import portlet: com.liferay.wiki.exception.DuplicateNodeNameException: {nodeId=0}
      17:18:58,060 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.wiki.exception.DuplicateNodeNameException: {nodeId=0}
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:407)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:433)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:419)
              at com.liferay.wiki.web.exportimport.data.handler.WikiPortletDataHandler.doImportData(WikiPortletDataHandler.java:182)
              at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:382)
              at com.liferay.wiki.web.exportimport.data.handler.WikiPortletDataHandler.importData(WikiPortletDataHandler.java:88)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:320)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:270)
              at com.liferay.exportimport.controller.PortletImportController.doImportPortletInfo(PortletImportController.java:899)
              at com.liferay.exportimport.controller.PortletImportController.importFile(PortletImportController.java:230)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:376)
              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:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
              at com.sun.proxy.$Proxy98.importPortletInfo(Unknown Source)
              at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:230)
              at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:133)
              at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:119)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:101)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:47)
              at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
              at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:87)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
              at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
              at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
              at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:124)
              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:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.wiki.exception.DuplicateNodeNameException: {nodeId=0}
              at com.liferay.wiki.service.impl.WikiNodeLocalServiceImpl.validate(WikiNodeLocalServiceImpl.java:569)
              at com.liferay.wiki.service.impl.WikiNodeLocalServiceImpl.validate(WikiNodeLocalServiceImpl.java:574)
              at com.liferay.wiki.service.impl.WikiNodeLocalServiceImpl.addNode(WikiNodeLocalServiceImpl.java:89)
              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:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
              at com.sun.proxy.$Proxy896.addNode(Unknown Source)
              at com.liferay.wiki.internal.exportimport.data.handler.WikiNodeStagedModelDataHandler.doImportStagedModel(WikiNodeStagedModelDataHandler.java:149)
              at com.liferay.wiki.internal.exportimport.data.handler.WikiNodeStagedModelDataHandler.doImportStagedModel(WikiNodeStagedModelDataHandler.java:40)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:363)
              ... 40 more

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 19 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP14
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.X
                  Master