Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5355

ELException when using TemplatingFunctions link-method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • 5.1.1
    • 5.1
    • templating
    • None
    • Mgnl 5.1-rc1 ee
      Windows 7
      Tomcat 7.0.32

      I've got a problem using the cmsfn functions (of class TemplatingFunctions).

      I get an ELException when trying to create a link in combination with nodeByPath-method:

      ${cmsfn.link(cmsfn.nodeByPath("/Startseite", "website"))}

      This leads to ELException, because nodeByPath returns a info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper object and EL tries to use the link-method with parameter ContentMap instead of that one with Node. Seems EL has a problem recognizing that the wrapper implements JCR Node.

      Using another link-method of TemplatingFunctions works fine:

      ${cmsfn.link("website", cmsfn.nodeByPath("/Startseite", "website").UUID)}

      Note: I'm using Blossom and have cmsfn configured via spring configuration, but I don't think that makes a difference.

      #######################################################

      Stacktrace:

      Caused by: javax.el.ELException: Cannot convert node /Startseite of type class info.magnolia.audit.MgnlAuditLoggingContentDecoratorNodeWrapper to class info.magnolia.jcr.util.ContentMap
      at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:420) ~[jasper-el.jar:7.0.32]
      at org.apache.el.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:47) ~[jasper-el.jar:7.0.32]
      at javax.el.BeanELResolver.invoke(BeanELResolver.java:477) ~[el-api.jar:2.2.FR]
      at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:161) ~[el-api.jar:2.2.FR]
      at org.apache.el.parser.AstValue.getValue(AstValue.java:173) ~[jasper-el.jar:7.0.32]
      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185) ~[jasper-el.jar:7.0.32]
      at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:986) ~[jasper.jar:7.0.32]
      at org.apache.jsp.WEB_002dINF.pages.components.shoppingCart_jsp._jspService(shoppingCart_jsp.java:80) ~[na:na]
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) ~[jasper.jar:7.0.32]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) ~[servlet-api.jar:na]
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) ~[jasper.jar:7.0.32]
      ... 186 common frames omitted

        Acceptance criteria

              jchocholacek Jozef Chocholacek
              sigurd.rolfes Sigurd Rolfes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD