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

Nested Web Content Structure Fails To Export

    Details

      Description

      Description:
      Liferay Fails to export a Web Content article when its structure consists of a nested Web Content. This only occurs when the Web Content is placed inside of another element such as a Text Field.

      This bug happens because of the way the JournalArticleExportImportContentProcessor.replaceExportJournalArticleReferences method is written. Once it finds a field of the web content type, it continues to parse the contents of every subsequent CDATA[], even inside of elements that are outside of that field. The fix will need to be to make it so that it only parses the contents of CDATA[] elements that are part of the web content field.

      This bug is only reproducible in ee-7.0.x. It is not reproducible in master because LPS-69093 and LPS-69400 drastically changed the way that the JournalArticleExportImportContentProcessor.replaceExportJournalArticleReferences method works. However, these are story tickets, so we cannot backport them. We will make this unique fix for ee-7.0.x instead.

      Steps To Reproduce:

      1. Start up Liferay.
      2. Create a Web Content Structure with a text field and a Web Content inside of the text field
      3. Create a Template to house the Structure
      4. Create a Web Content article with the text field and article filled in.
      5. Publish the Article
      6. Attempt to export the Web Content .lar including Templates and Structures

      Expected Results:
      The .lar exports successfully

      Actual Results:
      The .lar fails to export and reports the following error:

      An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
      com.liferay.portal.kernel.json.JSONException: org.json.JSONException: A JSONObject text must begin with '{' at character 1

      Reproduced in:
      master? No, issue not reproduced in master because LPS-69093 and LPS-69400 drastically changed how the JournalArticleExportImportContentProcessor.replaceExportJournalArticleReferences method works (a61624d5129b8d26f7ba6a9c07f76130fd565b28)
      ee-7.0.x? Yes, issue reproduced in ee-7.0.x (898f3c04cbf9fd201565384d3eeb958bd9b5e238)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 25 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 DXP FP13
                7.0.0 DXP SP3
                7.0.3 CE GA4
                7.0.X EE