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

Uploading image via Media Gallery returns NPE error

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 7.0.0 M3
    • Fix Version/s: 7.0.0 M3
    • Component/s: DM, DM > Media Gallery
    • Labels:
      None

      Description

      Steps to reproduce issue:

      1. Add Media Gallery portlet
      2. In MG Configurations, check the following:
        • Show Actions
        • Show Folder Menu
        • Show Navigation Links
        • Show Search
      3. Under Folders Listing > Root Folder, click "Select" > Home
      4. Save Configuration settings
      5. Click "Add Media" > Basic Document
        • Select an image file to upload
        • Give image file a title
        • Publish

      Expected result: Image publishes to Media Gallery with no errors or exceptions
      Actual result: Image publishes to Media Gallery, but portal throws a console error (see below)

      18:06:11,910 ERROR [RuntimePageImpl-2][IncludeTag:129] Current URL /web/guest/home?p_p_id=31_INSTANCE_MHyPdsdy7eCE&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1 generates exception: null
      java.lang.NullPointerException
              at com.liferay.portlet.documentlibrary.service.permission.DLFileShortcutPermission.contains(DLFileShortcutPermission.java:54)
              at org.apache.jsp.html.portlet.image_005fgallery_005fdisplay.view_005fimages_jsp._jspService(view_005fimages_jsp.java:1036)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:75)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:52)
              at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:312)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:193)
              at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:84)
              at org.apache.jsp.html.portlet.image_005fgallery_005fdisplay.view_jsp._jspx_meth_liferay_002dutil_005finclude_005f2(view_jsp.java:1400)
              at org.apache.jsp.html.portlet.image_005fgallery_005fdisplay.view_jsp._jspService(view_jsp.java:1073)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:75)
              at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:52)
              at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:312)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:193)
              at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:84)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 3 weeks, 4 days ago

                Packages

                Version Package
                7.0.0 M3