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

UnsuppportedOperationException when importing lar with a WCD which references a content from a parent site based on a global structure

    Details

      Description

      Steps to reproduce:

      1. Configure two Liferay environments A and B
        With A:
      2. Create a site "Father"
      3. Create a child site of this site "Father" called "Son"
      4. Create a structure StrGlobal in Global
      5. Create a template TemGlobal for this structure in Global
      6. Create a content FatherContent based on the structure StrGlobal
      7. Create a public page in the site "Son"
      8. Add a Web Content Display to that page
      9. Configure the Web Content Display to select content FatherContent
      10. Export the site "Son"
      11. Export the web contents from Global
        With B:
      12. Import the web contents of Global from A
      13. Create a site "Father"
      14. Create a child site of this site "Father" called "Son"
      15. Import the site "Son" from A in the site "Son"

      Actual result:

      • An UnsupportedOperationException is thrown:
        09:38:59,388 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:133] Unable to execute background task
        com.liferay.portal.kernel.lar.PortletDataException: java.lang.UnsupportedOperationException
                at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importParentSiteStagedModel(BaseStagedModelDataHandler.java:165)
                at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:255)
                at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModels(StagedModelDataHandlerUtil.java:410)
                at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:594)
                at com.liferay.portlet.journal.lar.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:1)
                at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:189)
                at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:432)
                at com.liferay.portal.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModels(StagedModelDataHandlerUtil.java:393)
                at com.liferay.portlet.journal.lar.JournalContentPortletDataHandler.doProcessImportPortletPreferences(JournalContentPortletDataHandler.java:260)
                at com.liferay.portal.kernel.lar.BasePortletDataHandler.processImportPortletPreferences(BasePortletDataHandler.java:596)
                at com.liferay.portal.lar.PortletImporter.importPortletPreferences(PortletImporter.java:1189)
                at com.liferay.portal.lar.LayoutImporter.doImportLayouts(LayoutImporter.java:792)
                at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:253)
                at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1771)
                at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:1820)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:606)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
                at com.liferay.portal.service.impl.LayoutLocalServiceVirtualLayoutsAdvice.invoke(LayoutLocalServiceVirtualLayoutsAdvice.java:182)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
                at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice.invoke(LayoutLocalServiceStagingAdvice.java:141)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
                at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:65)
                at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
                at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
                at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
                at com.sun.proxy.$Proxy35.importLayouts(Unknown Source)
                at com.liferay.portal.service.LayoutLocalServiceUtil.importLayouts(LayoutLocalServiceUtil.java:1314)
                at com.liferay.portal.lar.backgroundtask.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:61)
                at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:57)
                at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:108)
                at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
                at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
                at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
                at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
                at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
                at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.UnsupportedOperationException
                at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.doImportGroupStagedModel(BaseStagedModelDataHandler.java:288)
                at com.liferay.portal.kernel.lar.BaseStagedModelDataHandler.importParentSiteStagedModel(BaseStagedModelDataHandler.java:153)
                ... 38 more
        

      Expected results:

      • The site is imported successfully

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                summer.zhang Summer Zhang
                Reporter:
                daniel.couso Daniel Couso
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 36 weeks ago

                  Packages

                  Version Package
                  6.2.X EE