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

Cannot configure Dynamic Data Lists Display portlet to use a non-default Display Template

    Details

      Description

      Trying to use a custom Display Template for the Dynamic Data Lists Display portlet will fail to render. This is due to the DDLDisplayTemplateHandler not being found in the registry of TemplateHandlers.

      Steps to reproduce:

      1. From Content -> Dynamic Data Lists, create a new Data Definition
      2. For the new Data Definition, create a Display Template
      3. Add a new Dynamic Data List based on the new Data Definition
      4. On the Liferay home page, add a Dynamic Data Lists Display portlet
      5. Select the list created in step 3 to display
      6. Exit to the page, then go to the portlet's configuration
      7. Under "Optional Configuration," change the Display Template to the Display Template created in step 2
      8. Save the configuration and exit back to the page (or refresh)
        Expected result: the Display Template is loaded and rendered as expected
        Actual result: the Display Template fails to load, and an error is thrown in the console

      Reproduced in master: 44fbba759fa8cc88faef2406168d9967eec810dc

      The error shown in the console is like the following:

      15:48:58,515 ERROR [http-nio-8080-exec-9][IncludeTag:128] Current URL /web/guest/home generates exception: java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.dynamic.data.lists.web.internal.template.DDLDisplayTemplateTransformer.transform(DDLDisplayTemplateTransformer.java:99)
      	at org.apache.jsp.view_005ftemplate_005frecords_jsp._jspService(view_005ftemplate_005frecords_jsp:327)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:413)
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:424)
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
      	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
      	at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
      	at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:372)
      	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:349)
      	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:202)

        Attachments

        1. Failed.PNG
          47 kB
          Harry Chai
        2. FailedToReproduce.png
          15 kB
          Alec Shay
        3. Fixed.PNG
          12 kB
          Harry Chai
        4. Fixed70.PNG
          155 kB
          Harry Chai

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP23
                  7.0.X EE
                  7.0.4 CE GA5
                  7.1.X
                  Master