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

Unable to publish a web content with a structure that contains a web content

    Details

      Description

      Steps to reproduce:

      1. Enable local live staging
      2. Create a basic web content
      3. Create a web content structure that contains one web content
      4. Create a template for it
      5. Create a web content based on that structure
      6. Publish to live

      Expected result:
      Publication is successful

      Actual result:
      Failure to publish and error in the console log

      2019-02-21 19:25:30.485 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:173] Unable to execute background task
      com.liferay.exportimport.kernel.lar.PortletDataException: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:433)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:456)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:442)
      	at com.liferay.exportimport.changeset.web.internal.portlet.data.handler.ChangesetPortletDataHandler.doImportData(ChangesetPortletDataHandler.java:215)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:383)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:410)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:346)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.doImportPortletInfo(PortletImportControllerImpl.java:1104)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importFile(PortletImportControllerImpl.java:299)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:464)
      	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.AopMethodInvocation.proceed(AopMethodInvocation.java:44)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.lambda$invoke$0(TransactionInterceptor.java:61)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:59)
      	at com.liferay.portal.spring.aop.AopMethodInvocation.proceed(AopMethodInvocation.java:51)
      	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:44)
      	at com.sun.proxy.$Proxy93.importPortletInfo(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:184)
      	at com.liferay.exportimport.internal.background.task.PortletStagingBackgroundTaskExecutor$PortletStagingCallable.call(PortletStagingBackgroundTaskExecutor.java:164)
      	at com.liferay.exportimport.internal.background.task.PortletStagingBackgroundTaskExecutor$PortletStagingCallable.call(PortletStagingBackgroundTaskExecutor.java:141)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor._execute(DefaultTransactionExecutor.java:128)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:51)
      	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
      	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
      	at com.liferay.exportimport.internal.background.task.PortletStagingBackgroundTaskExecutor.execute(PortletStagingBackgroundTaskExecutor.java:92)
      	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
      	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.json.JSONException: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
      	at com.liferay.portal.json.JSONObjectImpl.<init>(JSONObjectImpl.java:82)
      	at com.liferay.portal.json.JSONFactoryImpl.createJSONObject(JSONFactoryImpl.java:157)
      	at com.liferay.portal.kernel.json.JSONFactoryUtil.createJSONObject(JSONFactoryUtil.java:69)
      	at com.liferay.dynamic.data.mapping.exportimport.content.processor.DDMFormValuesExportImportContentProcessor$JournalArticleImportDDMFormFieldValueTransformer.transform(DDMFormValuesExportImportContentProcessor.java:547)
      	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.replaceImportContentReferences(DDMFormValuesExportImportContentProcessor.java:115)
      	at com.liferay.dynamic.data.mapping.exportimport.content.processor.DDMFormValuesExportImportContentProcessor.replaceImportContentReferences(DDMFormValuesExportImportContentProcessor.java:62)
      	at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceImportContentReferences(JournalArticleExportImportContentProcessor.java:154)
      	at com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor.replaceImportContentReferences(JournalArticleExportImportContentProcessor.java:72)
      	at com.liferay.adaptive.media.journal.web.internal.exportimport.content.processor.AMJournalArticleExportImportContentProcessor.replaceImportContentReferences(AMJournalArticleExportImportContentProcessor.java:68)
      	at com.liferay.adaptive.media.journal.web.internal.exportimport.content.processor.AMJournalArticleExportImportContentProcessor.replaceImportContentReferences(AMJournalArticleExportImportContentProcessor.java:28)
      	at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:581)
      	at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:105)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
      	... 39 more
      Caused by: org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
      	at org.json.JSONTokener.syntaxError(JSONTokener.java:433)
      	at org.json.JSONObject.<init>(JSONObject.java:188)
      	at org.json.JSONObject.<init>(JSONObject.java:314)
      	at com.liferay.portal.json.JSONObjectImpl.<init>(JSONObjectImpl.java:79)
      	... 54 more
      

      Reproduced on:

      Tomcat 9.0.10 + MySQL 5.7.
      Portal Master GIT Commit: 957fd902d224ff7175944441f4f8a7274f00d6f3

        Attachments

          Activity

            People

            Assignee:
            maria.kispal Mária Kispál (Inactive)
            Reporter:
            brooke.dalton Brooke Dalton
            Participants of an Issue:
            Recent user:
            Brian Wulbern
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 36 weeks, 6 days ago

                Packages

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