Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Incomplete
-
2.0.11
-
None
Description
using 'tree' tag come with this error:
<!-- FREEMARKER ERROR MESSAGE -->language=javascript>//"></script><script
Expression parameters.templateDir is undefined on line 106, column 19 in template/ajax/tree.ftl.
The problematic instruction:
----------
==> ${parameters.templateDir} [on line 106, column 17 in template/ajax/tree.ftl]
in include "/${parameters.templateDir}/ajax/treenode-include.ftl" [on line 106, column 5 in template/ajax/tree.ftl]
----------
After adding value 'parameters.rootNode' to stack, value in variable 'parameters' became from valid value to '[0]'. So i fix this, with reasign variable 'parameters'. But I don't understand why this happened.
== template\ajax\tree.ftl ==
<#elseif parameters.rootNode?exists>
+ <#assign parameters=stack.findValue("parameters") />
${stack.push(parameters.rootNode)}
<#include "/${parameters.templateDir}/ajax/treenode-include.ftl" />
<#assign oldNode = stack.pop()/> <#-- pop the node off of the stack, but don't show it -->
</#if>