Hi Guillaume, On Mon, Nov 17, 2008 at 7:55 PM, Guillaume Lerouge <[EMAIL PROTECTED]>wrote:
> Hi Asiri, > > I just tested it and got an exception: > http://91.121.237.216/xwiki/bin/view/Test/WikiDeveloppeurs > > I can send you the original file if you wish. Could the exception be > related > to the presence of bulleted lists in the original document? I checked the > JIRA issue related to lists but it didn't seem to be the same one. > > It's the following content that is causing the exception to be thrown : Par exemple:*#if($context.user == «XWiki.Admin»)Vous êtes l'administrateur par défaut de ce wiki!#else Vous êtes un utilisateur classique.#end* Note that the velocity sample code is in italics, and this gets converted into xwiki syntax as follows : Par exemple://#if($context.user == «XWiki.Admin»)Vous êtes l'administrateur par défaut de ce wiki!#else Vous êtes un utilisateur classique.#end// And this causes the following exception when rendering : <dump> Caused by: java.lang.RuntimeException: Failed to parse link [exemple://#if($context.user] at org.xwiki.rendering.internal.parser.wikimodel.XDOMGeneratorListener.parseLink(XDOMGeneratorListener.java:571) at org.xwiki.rendering.internal.parser.wikimodel.XDOMGeneratorListener.onReference(XDOMGeneratorListener.java:433) at org.xwiki.rendering.internal.parser.wikimodel.XDOMGeneratorListener.onReference(XDOMGeneratorListener.java:414) at org.wikimodel.wem.impl.InternalWikiScannerContext.onReference(InternalWikiScannerContext.java:745) at org.wikimodel.wem.impl.WikiScannerContext.onReference(WikiScannerContext.java:302) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.line(XWikiScanner.java:1350) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.lines(XWikiScanner.java:1247) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.paragraph(XWikiScanner.java:1146) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.docElements(XWikiScanner.java:699) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.doParse(XWikiScanner.java:590) at org.wikimodel.wem.xwiki.javacc.XWikiScanner.parse(XWikiScanner.java:45) at org.wikimodel.wem.xwiki.XWikiParser.parse(XWikiParser.java:43) at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:50) ... 99 more Caused by: org.xwiki.rendering.parser.ParseException: Invalid URL format [exemple://#if($context.user] at org.xwiki.rendering.internal.parser.XWikiLinkParser.parseURI(XWikiLinkParser.java:159) at org.xwiki.rendering.internal.parser.XWikiLinkParser.parse(XWikiLinkParser.java:94) at org.xwiki.rendering.internal.parser.wikimodel.XDOMGeneratorListener.parseLink(XDOMGeneratorListener.java:568) ... 111 more Caused by: java.net.MalformedURLException: unknown protocol: exemple at java.net.URL.<init>(URL.java:574) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at org.xwiki.rendering.internal.parser.XWikiLinkParser.parseURI(XWikiLinkParser.java:157) ... 113 more </dump> The issue here is that the rendering mechanism thinks "exemple://#if($context.user ...." is a url and tries to parse it... I think this is something that has to be handled in the rendering module. We'll wait for vincent's opinion on this. Thanks. - Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

