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

The “required” option for “Associated Asset Types > All Asset Types” triggers image uploads to fail



      The “required” option for “Associated Asset Types > All Asset Types” triggers image uploads to fail without notifying the user.

      Reproduction Steps:

      1. Create a vocabulary named Countries and select “required” for “Associated Asset Types > All Asset Types”

      2. Add a few Categories to vocabulary Countries

      • Africa
      • America
      • Asia
      • Europe

      3. Add Web Content Display portlet to welcome page in Lifeary site

      4. Fill in title and content for the web content

      5. Select image icon for web content entry

      6. Click “Browse Server” icon and select the folder "Liferay"

      7. Click “Browse …” icon

      8. Navigate on file system and select a sample image

      9. Click “Upload button”

      Actual Results:
      No error reported on the portal page and the image is not uploaded.
      Errors displayed in Tomcat console

      Expected Results:
      A warning message should be display to the user so that user could upload the image in Documents and Media portlet

      10. Error in the log

      00:37:33,803 ERROR [http-bio-8080-exec-55][ConnectorAction:69] com.liferay.portal.editor.fckeditor.exception.FCKException: com.liferay.portlet.asset.AssetCategoryException
      com.liferay.portal.editor.fckeditor.exception.FCKException: com.liferay.portlet.asset.AssetCategoryException
      	at com.liferay.portal.editor.fckeditor.receiver.impl.DocumentCommandReceiver.fileUpload(DocumentCommandReceiver.java:108)
      	at com.liferay.portal.editor.fckeditor.receiver.impl.BaseCommandReceiver.fileUpload(BaseCommandReceiver.java:195)
      	at com.liferay.portal.editor.fckeditor.command.impl.FileUploadCommand.execute(FileUploadCommand.java:39)
      . . .
      Caused by: com.liferay.portlet.asset.AssetCategoryException
      	at com.liferay.portlet.asset.util.BaseAssetEntryValidator.validate(BaseAssetEntryValidator.java:136)
      	at com.liferay.portlet.asset.util.BaseAssetEntryValidator.validate(BaseAssetEntryValidator.java:75)
      	at com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl.validate(AssetEntryLocalServiceImpl.java:905)
      	at com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl.updateEntry(AssetEntryLocalServiceImpl.java:574)


          Issue Links



              • Assignee:
                he.song Serena Song (Inactive)
                laura.li Laura Li
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:
                  Days since last comment:
                  5 years, 47 weeks, 6 days ago


                  Version Package
                  6.1.X EE
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1