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

After refreshing a multiple document uploader with files uploaded, attempting to add Document Type with required fields results in an unexpected error message

    Details

    • Story Points:
      1
    • Fix Priority:
      4
    • Sprint:
      F&W Sprint 6

      Description

      Summary
      When adding files through the Multiple Document upload functionality, then refreshing the upload window, then attempting to re-save it with a custom Document Type with required fields, publshing results in an error indicating an-unexpected-error-occurred-while-saving-your-document.

      Note: After further testing, there seems to be strong evidence that the unexpected error appears only if we select a document type with a required field. All of the OOTB document types do not cause this behavior to occur.

      The problem here is twofold:

      • The files are not uploaded/saved with the selected Document Type
      • The key is not translated

      Use Case
      This emulates a scenario when files are dragged into the folder via the Multiple Upload functionality, but there is server slowness/unresponsiveness which prompts the user to refresh. Although this might seem like a unique use case, this is a realistic scenario, and the resulting behavior is problematic.

      Steps to Reproduce

      1. Go to Liferay DXP -> Contents -> Documents & Media
      2. Open Document Type tab and create new document type as "image type" for the title.
      3. Open up the Main Metadata Fields dropdown
      4. Give it a name (DocType), then add a Boolean field, and configure it with "Required – Yes"
      5. Save the Document Type
      6. Go back to Documents & Media
      7. Select multiple upload and drag & drop (not open up a dialog and select files) a group of a few test documents
      8. Refresh the page, you will see "These files have been previously uploaded but not actually saved. Please save or delete them before they are removed." message.
      9. Click the check box above the files to be saved to select all
      10. On the right hand side, select Document Type and select the DocType, and check the Boolean
      11. Publish

      Actual Result
      The files aren't uploaded and the UI displays an untranslated key an-unexpected-error-occurred-while-saving-your-document, (Note: This string is not translated in Japanese or English).

      Expected Result
      Files must be uploaded correctly.

      Reproduced In
      7.1.x Private Commit: 40d9e186b7f81ae2c027e7e89fdb1ad890d6eb9f

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 1 week, 1 day ago

                  Packages

                  Version Package
                  Master