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

Uploading empty files to a Documents and Media DDM field throws errors

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.0 M4
    • Fix Version/s: 7.0.0 M4
    • Component/s: DM
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Add a Structure with a Documents and Media field
        • Add a Template based on that structure
      2. Add a Web Content article based on that structure
        • Upload any file that has no data in it

      Expected result:
      User will be able to upload empty files, however unhelpful that may be.

      Actual result:
      UI throws a red message on the screen and the following console error is thrown:

      21:28:27,877 ERROR [http-bio-8080-exec-27][render_portlet_jsp:132] null
      java.lang.IllegalArgumentException: Input stream is null
              at com.liferay.portal.kernel.util.StreamUtil.transfer(StreamUtil.java:116)
              at com.liferay.portal.kernel.util.StreamUtil.transfer(StreamUtil.java:107)
              at com.liferay.portal.kernel.util.StreamUtil.transfer(StreamUtil.java:85)
              at com.liferay.portal.util.FileImpl.write(FileImpl.java:929)
              at com.liferay.portal.util.FileImpl.createTempFile(FileImpl.java:199)
              at com.liferay.portal.kernel.util.FileUtil.createTempFile(FileUtil.java:102)
              at com.liferay.portal.repository.capabilities.TemporaryFileEntriesCapabilityImpl.addTemporaryFileEntry(TemporaryFileEntriesCapabilityImpl.java:69)
              at com.liferay.portal.kernel.util.TempFileEntryUtil.addTempFileEntry(TempFileEntryUtil.java:82)
              at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.addTempFileEntry(DLAppServiceImpl.java:426)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:149)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:53)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:123)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:174)
              at com.liferay.portlet.documentlibrary.service.DLAppServiceUtil.addTempFileEntry(DLAppServiceUtil.java:279)
              at com.liferay.portlet.documentlibrary.action.EditFileEntryAction.addTempFileEntry(EditFileEntryAction.java:451)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 7 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 M4