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

Adding a DDL Display Template via DDL Display Template throws console errors

    Description

    Steps to Reproduce

    1. Navigate to Admin > Dynamic Data Lists
    2. Go to Manage Data Definition
    3. Add a Data Definition with Text field
    4. Add a new DDL Lists
    5. Select a created Text field Data Definition
    6. Save List
    7. Add a Dynamic Data Lists portlet to a page
    8. Select added DDL List
    9. Select 'Add Display Template'
    10. Insert a name
    11. Select 'Velocity' under Language panel
    12. In the ace editor input:
      #set ($records = $ddlDisplayTemplateHelper.getRecords($reserved_record_set_id))
      
      #if (!$records.isEmpty())
      #foreach ($cur_record in $records)
      <div class="ddl-record">$ddlDisplayTemplateHelper.renderRecordFieldValue($cur_record.getDDMFormFieldValues("Name").get(0), $locale)</div>
      #end
      #end
    13. Save template
    14. View console
    15. Add a Text record
    16. View console again

    Expected Result
    You are able to save the template and add a new text record without any errors.

    Actual Result
    Errors are thrown in the console and you cannot add a new Text record.

    Console Error:

    23:04:56,085 ERROR [http-nio-8080-exec-7][MinifierUtil:54] Unable to instantiate com.liferay.portal.minifier.GoogleJavaScriptMinifier
    23:12:11,078 ERROR [http-nio-8080-exec-1][IncludeTag:128] Current URL /web/guest/home?p_p_id=com_liferay_dynamic_data_lists_web_portlet_DDLDisplayPortlet_INSTANCE_VG1wnuyLnzCp&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view 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:325)
            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:373)
            at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:352)
            at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:202)

    Reproduced on
    Tomcat 8.0 + PostgreSQL 9.4
    Portal master GIT ID 858454f2c8282dc40324fb01a7eb88e1e2d5ca6c

      Attachments

        Issue Links

          Activity

            People

            • Assignee:
              clarissa.velazquez Clarissa Velazquez
              Reporter:
              clarissa.velazquez Clarissa Velazquez
              Participants of an Issue:
              Recent user:
              Jason Pince
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.1.X
                Master