Github issue: https://github.com/jsreport/jsreport/issues/1047
M
Posts made by mkjsix
-
Error when evaluating engine handlebars for template because of parse error "{{>"
Hi,
After upgrading to jsreport 3.11.2 from 3.6.2 my DOCX template fails with the following error:
Error when processing (child) render request (because) error when evaluating engine handlebars for template anonymous (because) parse error on line 5: ...dPageBreak/><w:t>{{> titlePartial val -----------------------^ Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID' (sandbox.js line 48:18) Error: Parse error on line 5: ...dPageBreak/><w:t>{{> titlePartial val -----------------------^ Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID' at Parser.parseError (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:267:19) at Parser.parse (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:336:30) at parseWithoutProcessing (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:46:33) at HandlebarsEnvironment.parse (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:52:13) at Object.precompile (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:485:17) at HandlebarsEnvironment.hb.precompile (/home/ec2-user/jsreportapp/node_modules/handlebars/dist/cjs/handlebars.js:42:40) at Object.compile (/home/ec2-user/jsreportapp/node_modules/@jsreport/jsreport-handlebars/lib/handlebarsEngine.js:34:52) at Object.compile (/home/ec2-user/jsreportapp/node_modules/@jsreport/jsreport-handlebars/lib/worker.js:26:43) at executionFn (/home/ec2-user/jsreportapp/node_modules/@jsreport/jsreport-core/lib/worker/render/executeEngine.js:195:42) at sandbox.js:48:18
It looks like the fragment
{{> titlePartial value=sections.0.title lang=@root.options.lang}}
is somehow escaped and{{>
becomes{{>
.As mentioned, the DOCX template was processed correctly when running jsreport v. 3.6.2.