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

Calling ${portletPreferences} in ADT throws error on page and in console

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 7.0.0 M4
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      4

      Description

      Steps to reproduce:

      1. Add RSS (or AP) portlet to a page
      2. Click the gear > Configuration
      3. Under the Display Template dropdown, click 'Manage Display Templates for Liferay'
        • Add a new ADT Template with the required *RSS Feeds lines
        • Also click to add the 'Portlet Preferences' line
        • Save and close the iframe
        • Select the new ADT Template
        • Save the changes to RSS configuration, and close the iframe

      Expected result:
      RSS will display with the new template setting and not throw any errors.

      Actual result:
      The RSS display indicates error lines and displays lines of the ADT template code, and console throws the following error:

      Error on line 8, column 3 in 20152#20194#20543
      Expecting a string, date or number here, Expression portletPreferences is instead a freemarker.template.SimpleHash
      The problematic instruction:
      ----------
      ==> ${portletPreferences} [on line 8, column 1 in 20152#20194#20543]
      ----------
      
      Java backtrace for programmers:
      ----------
      freemarker.core.NonStringException: Error on line 8, column 3 in 20152#20194#20543
      Expecting a string, date or number here, Expression portletPreferences is instead a freemarker.template.SimpleHash
              at freemarker.core.Expression.getStringValue(Expression.java:126)
              at freemarker.core.Expression.getStringValue(Expression.java:93)
              at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
              at freemarker.core.Environment.visit(Environment.java:221)
              at freemarker.core.MixedContent.accept(MixedContent.java:92)
              at freemarker.core.Environment.visit(Environment.java:221)
              at freemarker.core.Environment.process(Environment.java:199)
              at freemarker.template.Template.process(Template.java:237)
              at com.liferay.portal.freemarker.FreeMarkerTemplate.processTemplate(FreeMarkerTemplate.java:122)
              at com.liferay.portal.template.AbstractTemplate.doProcessTemplate(AbstractTemplate.java:89)
              at com.liferay.portal.template.AbstractTemplate.processTemplate(AbstractTemplate.java:136)
              at com.liferay.portal.template.RestrictedTemplate.processTemplate(RestrictedTemplate.java:60)
              at com.liferay.portal.templateparser.Transformer.mergeTemplate(Transformer.java:703)
              at com.liferay.portal.templateparser.Transformer.transform(Transformer.java:199)
              at com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateImpl.renderDDMTemplate(PortletDisplayTemplateImpl.java:392)
              at com.liferay.portlet.portletdisplaytemplate.util.PortletDisplayTemplateUtil.renderDDMTemplate(PortletDisplayTemplateUtil.java:169)
              at org.apache.jsp.html.taglib.ui.ddm_005ftemplate_005frenderer.page_jsp._jspService(page_jsp.java:527)
              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:357)
              at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:206)
              at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:92)
              at org.apache.jsp.view_jsp._jspService(view_jsp.java:751)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              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:728)
              at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:201)
              at com.liferay.portal.servlet.jsp.compiler.JspServlet.service(JspServlet.java:212)
              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.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:609)
              at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:543)
              at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:219)
              at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.processAlias(ProxyServlet.java:87)
              at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:66)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at com.liferay.portal.module.framework.ModuleFrameworkServletAdapter.service(ModuleFrameworkServletAdapter.java:51)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
              at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
              at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
              at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:38)
              at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:330)
              at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:415)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:431)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:151)
              at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:279)
              at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:367)
              at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
              at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:536)
              at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:595)
              at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:379)
              at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1264)
              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.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:662)
              at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:137)
              at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:140)
              at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:155)
              at com.liferay.portal.action.RenderPortletAction.execute(RenderPortletAction.java:112)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:180)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
              at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:543)
              at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:520)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:363)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:125)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:293)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:264)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:87)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:225)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
              at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
              at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
              at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
              at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package