FreeMarker template error:
Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans.
Left hand operand is a string (wrapper: f.t.SimpleScalar).
Right hand operand is a number (wrapper: f.t.SimpleNumber).
The blamed expression:
==> typeid == 1 [in template "product/" at line 59, column 14]
----
FTL stack trace ("~" means nesting-related):
- Failed at: #if typeid == 1 [in template "product/" at line 59, column 9]
- Reached through: @block name="content" [in template "_site" at line 216, column 5]
- Reached through: @extends name="/_site" [in template "product/" at line 210, column 1]
----
Java stack trace (for programmers):
----
freemarker.core._MiscTemplateException: [... Exception message was already printed; see it above ...]
at freemarker.core.EvalUtil.compare(EvalUtil.java:303)
at freemarker.core.EvalUtil.compare(EvalUtil.java:115)
at freemarker.core.ComparisonExpression.evalToBoolean(ComparisonExpression.java:78)
at freemarker.core.IfBlock.accept(IfBlock.java:49)
at freemarker.core.Environment.visit(Environment.java:371)
at freemarker.core.Environment$NestedElementTemplateDirectiveBody.render(Environment.java:3423)
at cn.org.rapid_framework.freemarker.directive.OverrideDirective$TemplateDirectiveBodyOverrideWraper.render(OverrideDirective.java:54)
at cn.org.rapid_framework.freemarker.directive.BlockDirective.execute(BlockDirective.java:30)
at freemarker.core.Environment.visit(Environment.java:452)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:102)
at freemarker.core.Environment.visit(Environment.java:335)
at freemarker.core.Environment.visit(Environment.java:341)
at freemarker.core.Environment.include(Environment.java:3104)
at freemarker.core.Environment.include(Environment.java:3015)
at cn.org.rapid_framework.freemarker.directive.ExtendsDirective.execute(ExtendsDirective.java:27)
at freemarker.core.Environment.visit(Environment.java:452)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:102)
at freemarker.core.Environment.visit(Environment.java:335)
at freemarker.core.Environment.visit(Environment.java:341)
at freemarker.core.Environment.process(Environment.java:314)
at freemarker.template.Template.process(Template.java:383)
at com.tuweisoft.xroom.vertxstart.cms.CmsRouteHandler.processTemplatePageItem(CmsRouteHandler.java:332)
at com.tuweisoft.xroom.vertxstart.cms.CmsRouteHandler.processGetHanlder(CmsRouteHandler.java:182)
at com.tuweisoft.xroom.vertxstart.cms.CmsRouteHandler.handle(CmsRouteHandler.java:88)
at com.tuweisoft.xroom.vertxstart.cms.CmsRouteHandler.handle(CmsRouteHandler.java:39)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:68)
at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)
at io.vertx.core.http.impl.Http1xServerRequestHandler.handle(Http1xServerRequestHandler.java:67)
at io.vertx.core.http.impl.Http1xServerRequestHandler.handle(Http1xServerRequestHandler.java:30)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)
at io.vertx.core.impl.WorkerContext.lambda$emit$0(WorkerContext.java:59)
at io.vertx.core.impl.WorkerContext.lambda$execute$4(WorkerContext.java:121)
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)