Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32170

Wrong variable name in email template

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.2
    • Fix Version/s: 12.0 [Tentative]
    • Component/s: Profile
    • Labels:
      None
    • 11 status:
      Merge

      Description

      I've found this error in logs:

      2017-02-09 09:50:47,298 ERROR Thread-35 freemarker.runtime - Error executing FreeMarker template
      FreeMarker template error:
      The following has evaluated to null or missing:
      ==> wallLink  [in template "profile2.wallPostMyWallNew" at line 4, column 3]
      
      Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??
      
      The failing instruction (FTL stack trace):
      ----------
      ==> ${wallLink}  [in template "profile2.wallPostMyWallNew" at line 4, column 1]
      ----------
      
      Java stack trace (for programmers):
      ----------
      freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
      	at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98)
      	at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:382)
      	at freemarker.core.Expression.evalAndCoerceToString(Expression.java:115)
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      	at freemarker.core.Environment.visit(Environment.java:265)
      	at freemarker.core.MixedContent.accept(MixedContent.java:93)
      	at freemarker.core.Environment.visit(Environment.java:265)
      	at freemarker.core.Environment.process(Environment.java:243)
      	at freemarker.template.Template.process(Template.java:277)
      	at org.sakaiproject.emailtemplateservice.util.TextTemplateLogicUtils.processTextTemplate(TextTemplateLogicUtils.java:85)
      	at org.sakaiproject.emailtemplateservice.service.impl.EmailTemplateServiceImpl.processText(EmailTemplateServiceImpl.java:275)
      	at org.sakaiproject.emailtemplateservice.service.impl.EmailTemplateServiceImpl.getRenderedTemplate(EmailTemplateServiceImpl.java:199)
      	at org.sakaiproject.emailtemplateservice.service.impl.EmailTemplateServiceImpl.getRenderedTemplateForUser(EmailTemplateServiceImpl.java:210)
      	at org.sakaiproject.profile2.logic.SakaiProxyImpl$1.run(SakaiProxyImpl.java:792)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jjmerono@um.es Juan José Meroño Sánchez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: