TreeError on build
-
Hello !
I'm trying to upgrade my nodebb 1.14.3 to 1.15.5 (before going on 1.16.0)... but it doesn't work for now.
When I activate some of my plugins, I have bad build messages like this one :
Failed at parse::tree::tree, TreeError
I think it's related with changes in benchpressjs from @PitaJ but I don't know what kind of error(s) in my templates I must track to solve these problems. Do you have tricks to solve this ?
Happy new year to everybody (hope it will be greater than 2020...) !
-
Well it seems to come from things like
{{{ if toto }}} many things {{{ end toto }}}
I thought it was possible but the error messages disappears when using
{{{ if toto }}} many things {{{ end }}}
So it is not possible now to use the first version ? I found it greatest to have a clear code.
-
@alfazaz
{{{ end toto }}}
is invalid syntax. It shouldn't have ever worked. But if it used to work, I shouldn't have broken it. Can you open an issue on the benchpress GitHub page? -
@pitaj {{{ end toto }}} never worked effectively.
In fact, I tried this because of warnings with the old <!-- ENDIF toto --> or <!-- END toto --> on build.
Now, I changed everything with {{{ end }}} ; this problem is solved (I have different problems to solve now ).
-
Two things :
-
It could be great to have the filename of the template which raises the TreeError error (if possible). It could help debugging.
-
Found something that I don't know if it's desired... It seems that changing
<!-- IF toto --> xxxx <!-- ENDIF toto -->
to{{{ if toto }}} xxxx {{{ end }}}
doesn't work for example for functions like in the<!-- IF function.displayMenuItem, @index -->
in menu.tpl . It's a little strange or I understand things wrong ?
-
-
@alfazaz errors like that should never happen, I'll need to fix that. Do you mind opening an issue on GitHub with an example that causes this compilation error?
As for the second one, can you provide a more fleshed out example?
-
@pitaj I made two issues on benchpressjs related to this topic if it helps :
Give template which gives TreeError · Issue #98 · benchpressjs/benchpressjs
Hello ! This issue is created after this nodebb community topic : https://community.nodebb.org/topic/15235 If we use bad {{{ if tutu }}} xxxxx {{{ end tutu }}} in a template, the build raises one or many Failed at parse::tree::tree, Tree...
GitHub (github.com)
Strange problem when going from old syntax to new syntax · Issue #99 · benchpressjs/benchpressjs
Hello ! This issue is created after this nodebb community topic : https://community.nodebb.org/topic/15235 I tried to convert all xxxxxx in my templates and I detected a strange thing you can reproduc...
GitHub (github.com)