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

If an existing Documents and Media Metadata Set field is changed to required, any existing documents without a value in that field can no longer be edited



      1) Control Panel -> Documents and Media
      2) Manage -> Document Types -> Add
      3) Name the Document Type "Test" and add one text field. Do not make it required.
      4) Publish a new document with type "Test" but don't fill in the single text field.
      5) Go to Manage -> Document Types. Edit "Test" and make the text field required.
      6) Edit the test document and fill in the now required field. Click Publish.
      EXPECTED: the document saves correctly with the fields filled in.
      ACTUAL: an error displays "Your request failed to complete."

      The issue is that the null metadata value is being saved in step 4. Then, when you edit the document in step 6, it calls DLFileEntryLocalServiceImpl.copyFileEntryMetadata and creates a new metadata based off of the previous metadata and then proceeds to update it. When copying the previous metadata and creating a new one, it runs through BaseStorageAdapter.validateDDMStructureFields which fails since the field is required but null.


        1. Fixed.PNG
          120 kB
        2. Reproduced.PNG
          73 kB

          Issue Links



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


                • Created:
                  Days since last comment:
                  3 years, 36 weeks, 5 days ago


                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 2