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

Cannot import Web Content if Small Image URL is set

    Details

      Description

      Reproduction steps:

      1. Start up the portal.
      2. Create a site, My Export Site
      3. Create a web content with a small image using small image URL
      4. Go to Publishing -> Export and export the site
      5. Create a new site, My Import Site
      6. Go to Publishing -> Import and import the previously exported lar file

      Experienced behavior: the import fails with the following error message

      2018-09-10 10:25:24.498 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:166] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:438)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:373)
              at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:359)
              at com.liferay.journal.exportimport.data.handler.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:360)
              at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:391)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:295)
              at com.liferay.exportimport.controller.PortletImportController.importPortletData(PortletImportController.java:835)
              at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:822)
              at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:218)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:206)
              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.RetryAdvice.invoke(RetryAdvice.java:47)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:39)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:48)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              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.$Proxy100.importLayouts(Unknown Source)
              at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:112)
              at com.liferay.exportimport.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:123)
              at com.liferay.exportimport.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:109)
              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.background.task.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:84)
              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: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.xml.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
              at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:408)
              at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:384)
              at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:419)
              at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:165)
              at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceImportImageFileEntryIds(JournalArticleExportImportContentProcessor.java:431)
              at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceImportContentReferences(JournalArticleExportImportContentProcessor.java:109)
              at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceImportContentReferences(JournalArticleExportImportContentProcessor.java:70)
              at com.liferay.journal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:632)
              at com.liferay.journal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:86)
              at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:386)
              ... 59 more
      Caused by: org.dom4j.DocumentException: Error on line 1 of document  : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
              at org.dom4j.io.SAXReader.read(SAXReader.java:482)
              at org.dom4j.io.SAXReader.read(SAXReader.java:365)
              at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:405)
              ... 68 more

      Expected behavior: the lar file should be imported without any issues

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP59
                7.0.0 DXP SP9
                7.0.X