Sorry for the late reply. On Fri, Jul 20, 2012 at 12:46 PM, CHENEAU-GREHALLE Nicolas <[email protected]> wrote:
Hi,
We have a problem with titles with the 4.1.3 release (not sure if it's release specific however, I just spend lot of time in logs because of the migration) :
When title contains the character '#' at the end, the title disappears from the page (only the page name is printed). There is error traces when viewing the document and from Lucene :
2012/07/19 14:35:34 [http://localhost:8080/xem/wiki/supporttechnique/get/XWiki/SuggestLucene Service?outputSyntax=plain&query=__INPUT__*&nb=3&input=8192] WARN o.x.d.i.DocumentTitleDisplayer - Failed to interpret title of document [supporttechnique:Archives.ExempleCodeC].
2012/07/20 10:06:22 [http://localhost:8080/xem/wiki/supporttechnique/get/Archives/ExempleCod eC?xpage=xpart&vm=commentsinline.vm] WARN o.x.d.i.DocumentTitleDisplayer - Failed to interpret title of document [supporttechnique:Archives.ExempleCodeC].
Is it a known bug ?
It's not a bug, it's a feature. XWiki supports Velocity code ( http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html ) in page title and # is a special Velocity character that precedes Velocity statements, macro definitions and calls. You can reproduce the problem by putting: {{velocity}} test# {{/velocity}} in the content of a wiki page. The solution is to escape the hash character using http://velocity.apache.org/tools/devel/generic/EscapeTool.html#getHash%28%29 : Your title$escapetool.h Hope this helps, Marius
Thank you
Nicolas
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users