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

Improve error log messaging for DDM structure validation

    Details

      Description

      DESCRIPTION
      When a journal article associated to a DDM structure has validation issues, an exception is thrown in JournalArticleLocalServiceImpl.validateDDMStructureFields which says:

       "Required field value is not present for " + defaultlocale; 

      This error message does not mention which article these errors occur in, nor for which field or structure. A customer is trying to import their site LAR and was encountering errors in their import related to a journal article, but was unable to determine the cause of the error from this message. This error is correct, because the web content article has a "required" text field that is not being used. Unfortunately, the error is vague and does not tell us what is causing the error.

      STEPS TO REPRODUCE
      1) Create a structure with a text field. Create a template for that structure.
      2) Create a web content article on that structure, but leave the text field blank.
      3) Change the structure to now make the text field required.
      4) Control Panel>Site>Publishing>Export the site into a LAR.
      5) Create a new site and Import the site LAR

      EXPECTED RESULTS
      Error is thrown and is descriptive of issue. It would be helpful to see which article, or at least the offending field and structure.
      ACTUAL RESULTS
      Only error is shown on page: com.liferay.dynamic.data.mapping.exception.StorageFieldRequiredException: Required field value is not present for en_US

      BRANCH
      Reproduced
      2df21c92b7011caa173aac4978a1569cb2bf40af
      MASTER
      Reproduced
      0fba37a7fedfe34d30f3754e7a538288b6288156

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 43 weeks ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP11
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  7.1.X
                  Master