FreeMarker template error: The following has evaluated to null or missing: ==> chnl.parentChannel [in template "templateName" at line 33, column 34] 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. (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): ---------- ==> ${chnl.parentChannel.name!} [in template "templateName" at line 33, column 32] @channel [in template "templateName" at line 32, 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.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:41) at freemarker.core.UnexpectedTypeException.(UnexpectedTypeException.java:24) at freemarker.core.Dot._eval(Dot.java:81) at freemarker.core.Expression.eval(Expression.java:111) at freemarker.core.DefaultToExpression._eval(DefaultToExpression.java:116) at freemarker.core.Expression.eval(Expression.java:111) 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$1.render(Environment.java:313) at com.ceeye.seesite.tags.ChannelTag.execute(ChannelTag.java:80) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) 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 com.ceeye.common.utils.FreemarkerUtil.writeHtml(FreemarkerUtil.java:110) at com.ceeye.seesite.service.article.ArticleService.publishContent(ArticleService.java:541) at com.ceeye.seesite.common.InitManager.AsyncPublish(InitManager.java:499) at com.ceeye.seesite.common.InitManager.access$0(InitManager.java:470) at com.ceeye.seesite.common.InitManager$1.run(InitManager.java:376) at java.lang.Thread.run(Thread.java:748) 【新课预告】新冠肺炎疫情下慢性肾脏病患者应对策略
FreeMarker template error: The following has evaluated to null or missing: ==> chnl.parentChannel [in template "templateName" at line 33, column 34] 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. (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): ---------- ==> ${chnl.parentChannel.name!} [in template "templateName" at line 33, column 32] @channel [in template "templateName" at line 32, 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.UnexpectedTypeException.newDesciptionBuilder(UnexpectedTypeException.java:41) at freemarker.core.UnexpectedTypeException.(UnexpectedTypeException.java:24) at freemarker.core.Dot._eval(Dot.java:81) at freemarker.core.Expression.eval(Expression.java:111) at freemarker.core.DefaultToExpression._eval(DefaultToExpression.java:116) at freemarker.core.Expression.eval(Expression.java:111) 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$1.render(Environment.java:313) at com.ceeye.seesite.tags.ChannelTag.execute(ChannelTag.java:80) at freemarker.core.Environment.visit(Environment.java:341) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136) 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 com.ceeye.common.utils.FreemarkerUtil.writeHtml(FreemarkerUtil.java:115) at com.ceeye.seesite.service.article.ArticleService.publishContent(ArticleService.java:541) at com.ceeye.seesite.common.InitManager.AsyncPublish(InitManager.java:499) at com.ceeye.seesite.common.InitManager.access$0(InitManager.java:470) at com.ceeye.seesite.common.InitManager$1.run(InitManager.java:376) at java.lang.Thread.run(Thread.java:748)