Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, Master
-
7.0.x
-
Committed
-
1
-
3
Description
Description
The behavior when attempting to export or import a web content that references another web content is inconsistent in certain cases. When the referenced web content is missing, the export process proceeds without error. However, when the referenced web content cannot be exported for any other reason (e.g. it is in the trash), the export will fail. I believe the export should fail in both cases, or succeed if the "Referenced Content" box is left unchecked.
Additionally, in the case that the export succeeds, the import of that LAR will fail. However, there is a similar "Referenced Content" box that can be checked or unchecked during the import process - but as far as I can tell, it doesn't seem to do anything. We should allow this user to uncheck the box to import LARs that have web content that reference missing web content (since that is a normal database state).
Steps to Reproduce
- Content -> Web Content -> Structures (three dots at top-right)
- Create a Structure with the name "Test Structure", add a Web Content field, Save
- Manage Templates -> Add a Template with the name "Test Template". Just simply Save it.
- Create a Basic Web Content with the name "Referenced". Publish
- Create a Web Content using the "Test Structure" structure, name it as "Steve Rogers". Select the "Referenced" in the Web. Save
- Move "Referened" to the Recycle Bin
- Publishing -> Export -> Custom Export -> Export
- "An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
The Web Content Article: Referenced could not be exported because its workflow status is not exportable." - Content -> Recycle Bin -> Empty the Recycle Bin
- Publishing -> Export -> Custom Export -> Export
- Download the Exported LAR file
- Import -> New Import Process -> Select the previously exported LAR -> Continue -> Import
Expected Result: The import completes successfully.
Actual Result: The import fails with the following error:
An unexpected error occurred with the publication process. Please check your portal and publishing configuration. com.liferay.portal.kernel.exception.PortalException: com.liferay.portal.kernel.exception.BulkException: {message = Unable to validate journal article references {com.liferay.journal.exception.NoSuchArticleException:No JournalArticle exists with the key {resourcePrimKey=30933}, com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {resourcePrimKey=30933}