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

Removing the parent-child relationship breaks export and configuration of asset publishers that reference the child site on the former parent's site

    Details

      Description

      Reproduction Steps:

      1. Start Liferay.
      2. Create a new site named "Parent".
      3. Create a child site under "Parent" named "Child".
      4. Add an asset publisher to a page on "Parent".
      5. In the configuration menu of the asset publisher, set the scope of the asset publisher only to the "Child" site.
      6. Remove the parent-child relationship by going to Site Settings for the "Child" site and removing the parent site. Note that in Control Panel > Sites that "Child" is no longer listed as a child site of "Parent".
      7. Attempt to export the "Parent" site.

      Expected Result: Export fails due to PrincipalException. User is instructed on what needs to be changed to fix the error.

      Actual Result: Export fails due to PrincipalException.

       

      2019-11-27 17:54:13.650 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:166] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: Unable to update portlet preferences during export
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.processExportPortletPreferences(AssetPublisherExportImportPortletPreferencesProcessor.java:153)
      	at com.liferay.exportimport.controller.PortletExportController.exportPortletPreference(PortletExportController.java:955)
      	at com.liferay.exportimport.controller.PortletExportController.exportPortletPreferences(PortletExportController.java:1052)
      	at com.liferay.exportimport.controller.PortletExportController.exportPortlet(PortletExportController.java:771)
      	at com.liferay.exportimport.controller.LayoutExportController.doExport(LayoutExportController.java:571)
      	at com.liferay.exportimport.controller.LayoutExportController.export(LayoutExportController.java:157)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.exportLayoutsAsFile(ExportImportLocalServiceImpl.java:64)
      	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.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.$Proxy101.exportLayoutsAsFile(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.exportLayoutsAsFile(ExportImportLocalServiceUtil.java:44)
      	at com.liferay.exportimport.background.task.LayoutExportBackgroundTaskExecutor.execute(LayoutExportBackgroundTaskExecutor.java:84)
      	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:125)
      	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:748)
      Caused by: com.liferay.portal.kernel.security.auth.PrincipalException
      	at com.liferay.asset.publisher.web.util.AssetPublisherUtil.getGroupIdFromScopeId(AssetPublisherUtil.java:1102)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor._getExportScopeId(AssetPublisherExportImportPortletPreferencesProcessor.java:1362)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.updateExportScopeIds(AssetPublisherExportImportPortletPreferencesProcessor.java:1032)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.updateExportPortletPreferences(AssetPublisherExportImportPortletPreferencesProcessor.java:1002)
      	at com.liferay.asset.publisher.web.internal.exportimport.portlet.preferences.processor.AssetPublisherExportImportPortletPreferencesProcessor.processExportPortletPreferences(AssetPublisherExportImportPortletPreferencesProcessor.java:148)
      	... 29 more
      

      Notes:

      • This can also be reproduced by deleting the child site.

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            lianne.louie Lianne Louie
            Participants of an Issue:
            Recent user:
            Joel Garman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 18 weeks ago

                Packages

                Version Package
                7.0.10.13 DXP SP13
                7.0.X
                7.1.X
                7.2.10 DXP FP5
                7.2.10.2 DXP SP2
                7.2.X
                7.3.1 CE GA2
                7.3.10 DXP GA1
                Master