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

Import process fails if a referenced Web Content is missing



      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

      1. Content -> Web Content -> Structures (three dots at top-right)
      2. Create a Structure with the name "Test Structure", add a Web Content field, Save
      3. Manage Templates -> Add a Template with the name "Test Template". Just simply Save it.
      4. Create a Basic Web Content with the name "Referenced". Publish
      5. Create a Web Content using the "Test Structure" structure, name it as "Steve Rogers". Select the "Referenced" in the Web. Save
      6. Move "Referened" to the Recycle Bin
      7. Publishing -> Export -> Custom Export -> Export
      8. "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."
      9. Content -> Recycle Bin -> Empty the Recycle Bin
      10. Publishing -> Export -> Custom Export -> Export
      11. Download the Exported LAR file
      12. 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}


        Issue Links



              summer.zhang Summer Zhang
              michael.bowerman Michael Bowerman
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              2 Start watching this issue


                5 years, 11 weeks, 3 days ago


                  Version Package
                  7.0.0 DXP FP36
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.1.0 M1