Re: [xwiki-users] [xwiki-devs] Office-Importer Test Server.

2008-11-18 Thread Vincent Massol
Hi,

On Nov 18, 2008, at 6:04 AM, Asiri Rathnayake wrote:

 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*

[snip]

 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.

First, a comment:
* I'm currently working on error handling and this error will be  
reported inline with an ErrorBlock and thus with a visual error where  
it happened in the very near future.

The format for an inline link is (scheme):(something)

However for URIs, only some are considered valid: mailto, image, attach
For URL (i.e of the form (scheme)://(something) there's no check  
currently and all are considered URLs and checked to be valid.

The reason we don't check for validity is because there can be any  
number of valid URL schemes (for example skype:// is a valid scheme if  
you've registered skype URL in your browser).

I don't see any solution for this except not allowing inline links but  
I'm not sure this is a good solution.

I think the inline error handling is the best solution and the user  
will use {{{exemple://#if($context.user..}}} if we really wants to  
enter this text.

WDYT?

Thanks
-Vincent



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] Office-Importer Test Server.

2008-11-18 Thread Guillaume Lerouge
I think Vincent is right: since this kind of error will probably not happen
that often, therefore displaying a visual error in the document while
rendering correctly all the remaining text should be ok.
Guillaume
On Tue, Nov 18, 2008 at 9:05 AM, Vincent Massol [EMAIL PROTECTED] wrote:

 Hi,

 On Nov 18, 2008, at 6:04 AM, Asiri Rathnayake wrote:

  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*

 [snip]

  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.

 First, a comment:
 * I'm currently working on error handling and this error will be
 reported inline with an ErrorBlock and thus with a visual error where
 it happened in the very near future.

 The format for an inline link is (scheme):(something)

 However for URIs, only some are considered valid: mailto, image, attach
 For URL (i.e of the form (scheme)://(something) there's no check
 currently and all are considered URLs and checked to be valid.

 The reason we don't check for validity is because there can be any
 number of valid URL schemes (for example skype:// is a valid scheme if
 you've registered skype URL in your browser).

 I don't see any solution for this except not allowing inline links but
 I'm not sure this is a good solution.

 I think the inline error handling is the best solution and the user
 will use {{{exemple://#if($context.user..}}} if we really wants to
 enter this text.

 WDYT?

 Thanks
 -Vincent



 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://blog.xwiki.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] Office-Importer Test Server.

2008-11-17 Thread Guillaume Lerouge
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.

Guillaume

On Mon, Nov 17, 2008 at 12:57 PM, Asiri Rathnayake 
[EMAIL PROTECTED] wrote:

 Hi All,

 I have setup a test server for testing the new xwiki-office-importer
 feature
 @ http://91.121.237.216/xwiki/bin/view/Main/

 Please note that this is the same server used for testing xwiki-webdav
 interface.

 Known issues for office-importer :

 * Table support is limited due to :
 http://jira.xwiki.org/jira/browse/XWIKI-2804 
 http://jira.xwiki.org/jira/browse/XWIKI-2834
 * List support is limited due to :
 http://jira.xwiki.org/jira/browse/XWIKI-2812
 * Image links (links with images as labels) are not supported yet :
 http://jira.xwiki.org/jira/browse/XWIKI-2832

 Please help us improve office importer by testing it out and reporting as
 many bugs as you can ;)

 Thanks.

 - Asiri
 ___
 devs mailing list
 [EMAIL PROTECTED]
 http://lists.xwiki.org/mailman/listinfo/devs




-- 
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://blog.xwiki.com/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki-devs] Office-Importer Test Server.

2008-11-17 Thread Asiri Rathnayake
Hi Guillaume L,



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.


Nope, this seems to be a different issue.

This is the exception thrown at the back-end :

dump
org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with
id [/templates/contentview.vm]
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:107)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1600)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:654)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:194)
at
org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:170)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88)
at
org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:107)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178)
at
org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:143)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:107)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1600)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:124)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:226)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
at com.xpn.xwiki.plugin.webdav.DavFilter.doFilter(DavFilter.java:68)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:96)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:287)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)

Re: [xwiki-users] [xwiki-devs] Office-Importer Test Server.

2008-11-17 Thread Asiri Rathnayake
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
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users