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

Export of a webcontent with a link field pointing to a deleted page causes a NoSuchLayoutException

    Details

      Description

      Steps to reproduce

      1. Create one page, named layout1
      2. Create a webcontent structure with a link to page field and assign to it a template
      3. Create a webcontent using previous structure in field link to page, select layout1
      4. Delete page layout1
      5. Export all webcontents of current site
        • Expected behavior: webcontents are exported to a LAR file correctly
        • Wrong behavior: a NPE exception is thrown
          com.liferay.exportimport.kernel.lar.PortletDataException: No Layout exists with the key {groupId=20126, privateLayout=false, layoutId=5}
                  at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:149)
                  at com.liferay.exportimport.data.handler.base.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:80)
                  at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:183)
                  at com.liferay.journal.service.base.JournalArticleLocalServiceBaseImpl$3.performAction(JournalArticleLocalServiceBaseImpl.java:429)
                  at com.liferay.journal.service.base.JournalArticleLocalServiceBaseImpl$3.performAction(JournalArticleLocalServiceBaseImpl.java:425)
                  at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performAction(DefaultActionableDynamicQuery.java:404)
                  at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:316)
                  at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:278)
                  at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:336)
                  at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalPortletDataHandler.doExportData(JournalPortletDataHandler.java:298)
                  at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.exportData(BasePortletDataHandler.java:141)
                  at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.exportPortletData(PortletExportControllerImpl.java:719)
                  at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.exportPortlet(PortletExportControllerImpl.java:474)
                  at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.doExport(PortletExportControllerImpl.java:935)
                  at com.liferay.exportimport.internal.controller.PortletExportControllerImpl.export(PortletExportControllerImpl.java:153)
                  at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.exportPortletInfoAsFile(ExportImportLocalServiceImpl.java:150)
                  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:153)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)
                  at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
                  at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)
                  at com.sun.proxy.$Proxy124.exportPortletInfoAsFile(Unknown Source)
                  at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.exportPortletInfoAsFile(ExportImportLocalServiceUtil.java:80)
                  at com.liferay.exportimport.internal.background.task.PortletExportBackgroundTaskExecutor.execute(PortletExportBackgroundTaskExecutor.java:73)
                  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.portal.kernel.exception.NoSuchLayoutException: No Layout exists with the key {groupId=20126, privateLayout=false, layoutId=5}
                  at com.liferay.portal.service.persistence.impl.LayoutPersistenceImpl.findByG_P_L(LayoutPersistenceImpl.java:6971)
                  at com.liferay.portal.service.impl.LayoutLocalServiceImpl.getLayout(LayoutLocalServiceImpl.java:1223)
                  at sun.reflect.GeneratedMethodAccessor759.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:751)
                  at com.liferay.portal.service.impl.LayoutLocalServiceStagingAdvice$LayoutLocalServiceStagingInvocationHandler.invoke(LayoutLocalServiceStagingAdvice.java:638)
                  at com.sun.proxy.$Proxy255.getLayout(Unknown Source)
                  at sun.reflect.GeneratedMethodAccessor759.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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:203)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:94)
                  at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:113)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
                  at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:55)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:130)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:125)
                  at com.sun.proxy.$Proxy115.getLayout(Unknown Source)
                  at com.liferay.dynamic.data.mapping.exportimport.content.processor.DDMFormValuesExportImportContentProcessor$LayoutExportDDMFormFieldValueTransformer.transform(DDMFormValuesExportImportContentProcessor.java:382)
                  at com.liferay.dynamic.data.mapping.util.DDMFormValuesTransformer.performTransformation(DDMFormValuesTransformer.java:58)
                  at com.liferay.dynamic.data.mapping.util.DDMFormValuesTransformer.traverse(DDMFormValuesTransformer.java:78)
                  at com.liferay.dynamic.data.mapping.util.DDMFormValuesTransformer.transform(DDMFormValuesTransformer.java:47)
                  at com.liferay.dynamic.data.mapping.exportimport.content.processor.DDMFormValuesExportImportContentProcessor.replaceExportContentReferences(DDMFormValuesExportImportContentProcessor.java:80)
                  at com.liferay.dynamic.data.mapping.exportimport.content.processor.DDMFormValuesExportImportContentProcessor.replaceExportContentReferences(DDMFormValuesExportImportContentProcessor.java:53)
                  at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceExportContentReferences(JournalArticleExportImportContentProcessor.java:99)
                  at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceExportContentReferences(JournalArticleExportImportContentProcessor.java:70)
                  at com.liferay.adaptive.media.journal.web.internal.exportimport.content.processor.AMJournalArticleExportImportContentProcessor.replaceExportContentReferences(AMJournalArticleExportImportContentProcessor.java:47)
                  at com.liferay.adaptive.media.journal.web.internal.exportimport.content.processor.AMJournalArticleExportImportContentProcessor.replaceExportContentReferences(AMJournalArticleExportImportContentProcessor.java:28)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doExportStagedModel(JournalArticleStagedModelDataHandler.java:443)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doExportStagedModel(JournalArticleStagedModelDataHandler.java:103)
                  at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:102)
          

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              felix.zhang Felix Zhang
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Brian Wulbern
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 34 weeks, 6 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP7
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master