rehamaltamimi / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

possible recursive loop in #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a new page with the following content:
{{ordinal|{{#expr:{{#time:z|{{{1|April 14}}}}}+1}}}}
2. try to render that page

What is the expected output? What do you see instead?
the time template function gets called 3 times, with a parameter that seems to 
be the result of some loop (it grows by additional "#expr" expressions):
{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:
{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:
z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#exp
r:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#tim
e:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#e
xpr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{#expr:{{#t
ime:z|{{#expr:{{#time:z|{{#expr:{{#time:z|{{{1|April 
14}}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+
1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}}}}+1}
}}}+1}}}}+1}}}}+1}}

What version of the product are you using? On what operating system?
3.0.18-SNAPSHOT

Please provide any additional information below.

Original issue reported on code.google.com by nico.kru...@googlemail.com on 11 Apr 2012 at 12:58

GoogleCodeExporter commented 8 years ago
parsing the dateTimeParameter with your patch from issues 81 now (expectedly) 
gives "{{Error - recursion limit exceeded parsing templates.}}" as the parsed 
parameter in the first of many calls to the Time#parseFunction() function

Original comment by nico.kru...@googlemail.com on 11 Apr 2012 at 1:47

GoogleCodeExporter commented 8 years ago
Added r4457. please test if it works in your configuration

Original comment by axelclk@gmail.com on 14 Apr 2012 at 11:36

GoogleCodeExporter commented 8 years ago
thank you, works better now

you could probably also delete the following 2 methods as they are not used any 
more. Alternatively declare it as final in AbstractTemplateFunction - 
implementing classes should not mess with them, right?
info.bliki.wiki.template.AbstractTemplateFunction.parseFunction(List<String>, 
IWikiModel, char[], int, int)
info.bliki.wiki.template.ITemplateFunction.parseFunction(List<String>, 
IWikiModel, char[], int, int)

Original comment by nico.kru...@googlemail.com on 16 Apr 2012 at 12:09

GoogleCodeExporter commented 8 years ago
Done with r4589

Original comment by axelclk@gmail.com on 16 Apr 2012 at 6:49

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 27 Apr 2012 at 9:45