Affects Version/s: 7.0.X EE
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:
- Start up Liferay.
- Create a Web Content Structure with a text field and a Web Content inside of the text field
- Create a Template to house the Structure
- Create a Web Content article with the text field and article filled in.
- Publish the Article
- Attempt to export the Web Content .lar including Templates and Structures
The .lar exports successfully
The .lar fails to export and reports the following error:
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)