FAQTutorial broken in 1.9

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

FAQTutorial broken in 1.9

digulla
Hi,

After Vincent made my mouth water today at the Jazoon, I wanted to try
XWiki but I could get the FAQTutorial to work with the 1.9 release
(xwiki-enterprise-installer-generic-1.9-standard.jar). Specifically:

After I enter the two strings "FAQs" and "FAQ" in the text fields, I get
this text in the editor:

## replace Main with the Space where you want your documents to be created
## replace the default parent with the one of your choice
## Save this template using the 'Save' button
#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")



This looks good. After save&view, I see this:



 replace Main with the Space where you want your documents to be created
replace the default parent with the one of your choice
 Save this template using the 'Save' button
#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"

#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")



Note how the formatting is completely broken and that some ")" are
missing. When I open the page for editing, I see this:


## replace Main with the Space where you want your documents to be created
## replace the default parent with the one of your choice
## Save this template using the 'Save' button
#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"##

#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")



As you can see, there is suddenly an empty line, the ")))" have been
replaced with "##" and the whole thing doesn't work. When I get rid of
the Comments near the start and just leave this code:


#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")


that gets mangles as well:



#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"

#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")



Any ideas what could be wrong?


Oh, and when starting XWiki for the first time, I get this exception:


2009-06-24 20:58:26,853 [http://localhost:8080/xwiki/bin/view/Main/]
[481877743@qtp0-7] ERROR lucene.LucenePlugin             - cannot open
index /home/digulla/XWiki
Enterprise/jetty/work/Jetty_0_0_0_0_8080_xwiki__xwiki__5alevh/lucene
org.apache.lucene.index.CorruptIndexException: failed to locate current
segments_N file

        at
org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:207)

        at
org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722)
        at
org.apache.lucene.index.IndexWriter.init(IndexWriter.java:673)
        at
org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:523)
        at
com.xpn.xwiki.plugin.lucene.LucenePlugin.createSearchers(LucenePlugin.java:560)

        at
com.xpn.xwiki.plugin.lucene.LucenePlugin.openSearchers(LucenePlugin.java:579)

        at
com.xpn.xwiki.plugin.lucene.LucenePlugin.init(LucenePlugin.java:508)
        at
com.xpn.xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:155)

        at
com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:92)

        at
com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:120)

        at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1022)

        at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:742)

        at com.xpn.xwiki.XWiki.<init>(XWiki.java:670)





which is probably safe to ignore but maybe you can rid of it nonetheless :)

Best regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

Jean Couteau
Did you try this in xwiki 2.0 syntax ? If yes, try switching to xwiki
1.0 syntax.

Hope this helps

Jean.

Aaron Digulla a écrit :

> Hi,
>
> After Vincent made my mouth water today at the Jazoon, I wanted to try
> XWiki but I could get the FAQTutorial to work with the 1.9 release
> (xwiki-enterprise-installer-generic-1.9-standard.jar). Specifically:
>
> After I enter the two strings "FAQs" and "FAQ" in the text fields, I get
> this text in the editor:
>
> ## replace Main with the Space where you want your documents to be created
> ## replace the default parent with the one of your choice
> ## Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> This looks good. After save&view, I see this:
>
>
>
>  replace Main with the Space where you want your documents to be created
> replace the default parent with the one of your choice
>  Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> Note how the formatting is completely broken and that some ")" are
> missing. When I open the page for editing, I see this:
>
>
> ## replace Main with the Space where you want your documents to be created
> ## replace the default parent with the one of your choice
> ## Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"##
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> As you can see, there is suddenly an empty line, the ")))" have been
> replaced with "##" and the whole thing doesn't work. When I get rid of
> the Comments near the start and just leave this code:
>
>
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
> that gets mangles as well:
>
>
>
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> Any ideas what could be wrong?
>
>
> Oh, and when starting XWiki for the first time, I get this exception:
>
>
> 2009-06-24 20:58:26,853 [http://localhost:8080/xwiki/bin/view/Main/]
> [481877743@qtp0-7] ERROR lucene.LucenePlugin             - cannot open
> index /home/digulla/XWiki
> Enterprise/jetty/work/Jetty_0_0_0_0_8080_xwiki__xwiki__5alevh/lucene
> org.apache.lucene.index.CorruptIndexException: failed to locate current
> segments_N file
>
>         at
> org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:207)
>
>         at
> org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722)
>         at
> org.apache.lucene.index.IndexWriter.init(IndexWriter.java:673)
>         at
> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:523)
>         at
> com.xpn.xwiki.plugin.lucene.LucenePlugin.createSearchers(LucenePlugin.java:560)
>
>         at
> com.xpn.xwiki.plugin.lucene.LucenePlugin.openSearchers(LucenePlugin.java:579)
>
>         at
> com.xpn.xwiki.plugin.lucene.LucenePlugin.init(LucenePlugin.java:508)
>         at
> com.xpn.xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:155)
>
>         at
> com.xpn.xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:92)
>
>         at
> com.xpn.xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:120)
>
>         at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1022)
>
>         at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:742)
>
>         at com.xpn.xwiki.XWiki.<init>(XWiki.java:670)
>
>
>
>
>
> which is probably safe to ignore but maybe you can rid of it nonetheless :)
>
> Best regards,
>
>  


--
----
Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

vmassol
Administrator
In reply to this post by digulla
Hi Aaron,

Indeed, we're in a transition period with XWiki Enterprise 1.9 in that  
the default syntax is now the 2.0 syntax by default but the  
applications are still in 1.0 syntax. Thus the Class wizard currently  
generates 1.0 syntax. As Jean said, when a new page is created just  
make sure to select XWiki 1.0 syntax in the edit panel on the right.

You could also change the xwiki config file so that new pages are  
created in 1.0 syntax but in general we recommend users to try using  
the new syntax since it's generally better and allows you to get the  
new wysiwyg editor amongst other things.

I've just started converting the class wizard before Jazoon but didn't  
get the time to finish it hence the reason I did my demo in 1.0  
syntax ;)

FYI I'll probably be done in a few days, in time for the 1.9.1 release  
next week.

Thanks
-Vincent

On Jun 24, 2009, at 9:42 PM, Aaron Digulla wrote:

> Hi,
>
> After Vincent made my mouth water today at the Jazoon, I wanted to try
> XWiki but I could get the FAQTutorial to work with the 1.9 release
> (xwiki-enterprise-installer-generic-1.9-standard.jar). Specifically:
>
> After I enter the two strings "FAQs" and "FAQ" in the text fields, I  
> get
> this text in the editor:
>
> ## replace Main with the Space where you want your documents to be  
> created
> ## replace the default parent with the one of your choice
> ## Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> This looks good. After save&view, I see this:
>
>
>
> replace Main with the Space where you want your documents to be  
> created
> replace the default parent with the one of your choice
> Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> Note how the formatting is completely broken and that some ")" are
> missing. When I open the page for editing, I see this:
>
>
> ## replace Main with the Space where you want your documents to be  
> created
> ## replace the default parent with the one of your choice
> ## Save this template using the 'Save' button
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"##
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> As you can see, there is suddenly an empty line, the ")))" have been
> replaced with "##" and the whole thing doesn't work. When I get rid of
> the Comments near the start and just leave this code:
>
>
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
> that gets mangles as well:
>
>
>
> #set( $class = $doc.name.substring(0,$doc.name.indexOf("Class"
>
> #set($defaultparent = "XWiki.${class}Class")
> #set($defaultweb = "Main")
> #includeForm("XWiki.ClassSheet")
>
>
>
> Any ideas what could be wrong?
>
>
> Oh, and when starting XWiki for the first time, I get this exception:
>
>
> 2009-06-24 20:58:26,853 [http://localhost:8080/xwiki/bin/view/Main/]
> [481877743@qtp0-7] ERROR lucene.LucenePlugin             - cannot open
> index /home/digulla/XWiki
> Enterprise/jetty/work/Jetty_0_0_0_0_8080_xwiki__xwiki__5alevh/lucene
> org.apache.lucene.index.CorruptIndexException: failed to locate  
> current
> segments_N file
>
>        at
> org
> .apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:
> 207)
>
>        at
> org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722)
>        at
> org.apache.lucene.index.IndexWriter.init(IndexWriter.java:673)
>        at
> org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:523)
>        at
> com
> .xpn
> .xwiki.plugin.lucene.LucenePlugin.createSearchers(LucenePlugin.java:
> 560)
>
>        at
> com
> .xpn
> .xwiki.plugin.lucene.LucenePlugin.openSearchers(LucenePlugin.java:579)
>
>        at
> com.xpn.xwiki.plugin.lucene.LucenePlugin.init(LucenePlugin.java:508)
>        at
> com
> .xpn
> .xwiki.plugin.XWikiPluginManager.initPlugin(XWikiPluginManager.java:
> 155)
>
>        at
> com
> .xpn
> .xwiki.plugin.XWikiPluginManager.addPlugin(XWikiPluginManager.java:92)
>
>        at
> com
> .xpn
> .xwiki.plugin.XWikiPluginManager.addPlugins(XWikiPluginManager.java:
> 120)
>
>        at com.xpn.xwiki.XWiki.preparePlugins(XWiki.java:1022)
>
>        at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:742)
>
>        at com.xpn.xwiki.XWiki.<init>(XWiki.java:670)
>
>
>
>
>
> which is probably safe to ignore but maybe you can rid of it  
> nonetheless :)
>
> Best regards,
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

digulla
Zitat von Vincent Massol <[hidden email]>:

> Indeed, we're in a transition period with XWiki Enterprise 1.9 in that
> the default syntax is now the 2.0 syntax by default but the
> applications are still in 1.0 syntax. Thus the Class wizard currently
> generates 1.0 syntax. As Jean said, when a new page is created just
> make sure to select XWiki 1.0 syntax in the edit panel on the right.

Yikes! Please update the tutorial right now to make this fact *very*  
prominent!

I mean that's the first thing I tried after your talk and it *didn't work*.

Since XWiki can incorporate scripts, I suggest to write test cases  
that run inside the Wiki which make sure that the tutorials work in  
every release you make.

I also suggest to either have a download of the documentation or push  
it directly into the main download, so I have the docs locally (plus a  
link at the top "latest version of this page" which points to  
XWiki.org).

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

digulla
Aaron Digulla schrieb:

>> Indeed, we're in a transition period with XWiki Enterprise 1.9 in that
>> the default syntax is now the 2.0 syntax by default but the
>> applications are still in 1.0 syntax. Thus the Class wizard currently
>> generates 1.0 syntax. As Jean said, when a new page is created just
>> make sure to select XWiki 1.0 syntax in the edit panel on the right.
>
> Yikes! Please update the tutorial right now to make this fact *very*  
> prominent!

Okay, I got past the creation of the class but now it fails in "Create
Document Sheet" with:

content: No renderer found for target syntax [XWiki 1.0]

I also get errors when I switch between the WYSIWYG and the source view:

Caused by: com.google.gwt.user.server.rpc.UnexpectedException: Service
method 'public abstract java.lang.String
com.xpn.xwiki.wysiwyg.client.WysiwygService.fromHTML(java.lang.String,java.lang.String)'
threw an unexpected exception: java.lang.RuntimeException: No renderer
found for target syntax [XWiki 1.0]
        at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)

        at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)

        at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)

        at
com.xpn.xwiki.gwt.api.server.XWikiServiceImpl.processCall(XWikiServiceImpl.java:85)

        ... 29 more

Caused by: java.lang.RuntimeException: No renderer found for target
syntax [XWiki 1.0]

        at
org.xwiki.rendering.internal.renderer.DefaultPrintRendererFactory.createRenderer(DefaultPrintRendererFactory.java:85)

        at
com.xpn.xwiki.wysiwyg.server.converter.internal.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:69)

        at
com.xpn.xwiki.wysiwyg.server.DefaultWysiwygService.fromHTML(DefaultWysiwygService.java:146)




Frankly, is there a vesion where the tutorial works? I posted an entry
on my blog about XWiki which draws a lot of attention and the tutorial
doesn't work. This really sucks :(

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

digulla
Aaron Digulla schrieb:

> Okay, I got past the creation of the class but now it fails in "Create
> Document Sheet" with:
>
> content: No renderer found for target syntax [XWiki 1.0]

Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
where this works?

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Jean Couteau
Aaron Digulla a écrit :

> Aaron Digulla schrieb:
>
>  
>> Okay, I got past the creation of the class but now it fails in "Create
>> Document Sheet" with:
>>
>> content: No renderer found for target syntax [XWiki 1.0]
>>    
>
> Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
> where this works?
>
> Regards,
>
>  
Yes, older versions,

in fact there was a change of syntax between versions 1.8 and 1.9
(Vincent, correct me if I am wrong).

I use that on xwiki 1.5 everyday.

I did not try the last versions yet, but i reckon that if you change
your config to xwiki 1.0 for default syntax like Vincent told you, it
should work on 1.9 or 2.0

Best regards,
Jean.

--
----
Jean Couteau
Code Lutin - http://www.codelutin.com
44 Bd des Pas Enchantés - 44230 St-Sébastien/Loire
Tél : 02 40 50 29 28 - Fax : 09 59 92 29 28

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

vmassol
Administrator

On Jun 25, 2009, at 8:45 PM, Jean Couteau wrote:

> Aaron Digulla a écrit :
>> Aaron Digulla schrieb:
>>
>>
>>> Okay, I got past the creation of the class but now it fails in  
>>> "Create
>>> Document Sheet" with:
>>>
>>> content: No renderer found for target syntax [XWiki 1.0]
>>>
>>
>> Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
>> where this works?
>>
>> Regards,
>>
>>
> Yes, older versions,
>
> in fact there was a change of syntax between versions 1.8 and 1.9
> (Vincent, correct me if I am wrong).
>
> I use that on xwiki 1.5 everyday.
>
> I did not try the last versions yet, but i reckon that if you change
> your config to xwiki 1.0 for default syntax like Vincent told you, it
> should work on 1.9 or 2.0

yes exactly. That's what I did at jazoon for my demo (i.e set the  
default syntax to be 1.0).

To change to syntax 1.0 for newly created pages see the instructions  
here:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HConfiguringWikiSyntaxesanddefaultSyntax

That said it also works fine with pages created by default in xwiki  
syntax 2.0 provided you that for all newly created page you make sure  
to set them to 1.0 before saving the page. That means for:
1) class page
2) sheet page
3) template page
4) page to list all FAQ entries for ex

Best change the default syntax to 1.0 if you prefer.

Thanks
-Vincent
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

digulla
Vincent Massol schrieb:

> On Jun 25, 2009, at 8:45 PM, Jean Couteau wrote:
>
>> Aaron Digulla a écrit :
>>> Aaron Digulla schrieb:
>>>
>>>
>>>> Okay, I got past the creation of the class but now it fails in  
>>>> "Create
>>>> Document Sheet" with:
>>>>
>>>> content: No renderer found for target syntax [XWiki 1.0]
>>>>
>>> Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
>>> where this works?
>>>
>>> Regards,
>>>
>>>
>> Yes, older versions,
>>
>> in fact there was a change of syntax between versions 1.8 and 1.9
>> (Vincent, correct me if I am wrong).
>>
>> I use that on xwiki 1.5 everyday.
>>
>> I did not try the last versions yet, but i reckon that if you change
>> your config to xwiki 1.0 for default syntax like Vincent told you, it
>> should work on 1.9 or 2.0
>
> yes exactly. That's what I did at jazoon for my demo (i.e set the  
> default syntax to be 1.0).
>
> To change to syntax 1.0 for newly created pages see the instructions  
> here:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HConfiguringWikiSyntaxesanddefaultSyntax

Okay, that's what I was missing. Now the *ClassSheet can be edited but I
get an empty page (well, except for the header). I tried this:

#set($obj = $doc.getObject("XWiki.CharacterClass"))
obj=${obj}

#set($class = $doc.getObject("XWiki.CharacterClass").xWikiClass)
class=${class}


which gives me


obj=${obj}

class=${class}



in the output which probably means that it can't look up the class via
getObject(). Any ideas what could be wrong, now?

I'll also try with 1.5 ... okay, I don't have the problems with the
editors in 1.5 but it also can't find the class. What's this "Web"
variable supposed to do?

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Asiri Rathnayake
Hi,

On Fri, Jun 26, 2009 at 2:08 AM, Aaron Digulla <[hidden email]> wrote:

> Vincent Massol schrieb:
> > On Jun 25, 2009, at 8:45 PM, Jean Couteau wrote:
> >
> >> Aaron Digulla a écrit :
> >>> Aaron Digulla schrieb:
> >>>
> >>>
> >>>> Okay, I got past the creation of the class but now it fails in
> >>>> "Create
> >>>> Document Sheet" with:
> >>>>
> >>>> content: No renderer found for target syntax [XWiki 1.0]
> >>>>
> >>> Same happens with XWiki 2.0M1. Seriously, is there a version of XWiki
> >>> where this works?
> >>>
> >>> Regards,
> >>>
> >>>
> >> Yes, older versions,
> >>
> >> in fact there was a change of syntax between versions 1.8 and 1.9
> >> (Vincent, correct me if I am wrong).
> >>
> >> I use that on xwiki 1.5 everyday.
> >>
> >> I did not try the last versions yet, but i reckon that if you change
> >> your config to xwiki 1.0 for default syntax like Vincent told you, it
> >> should work on 1.9 or 2.0
> >
> > yes exactly. That's what I did at jazoon for my demo (i.e set the
> > default syntax to be 1.0).
> >
> > To change to syntax 1.0 for newly created pages see the instructions
> > here:
> >
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HConfiguringWikiSyntaxesanddefaultSyntax
>
> Okay, that's what I was missing. Now the *ClassSheet can be edited but I
> get an empty page (well, except for the header). I tried this:
>
> #set($obj = $doc.getObject("XWiki.CharacterClass"))
> obj=${obj}
>
> #set($class = $doc.getObject("XWiki.CharacterClass").xWikiClass)
> class=${class}
>
>
> which gives me
>
>
> obj=${obj}
>
> class=${class}
>
>
>
> in the output which probably means that it can't look up the class via
> getObject(). Any ideas what could be wrong, now?


Are you sure you have an Object of type "XWiki.CharacterClass" added to your
page?

Thanks.

- Asiri
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

digulla
Zitat von Asiri Rathnayake <[hidden email]>:

>> Okay, that's what I was missing. Now the *ClassSheet can be edited but I
>> get an empty page (well, except for the header). I tried this:
>>
>> #set($obj = $doc.getObject("XWiki.CharacterClass"))
>> obj=${obj}
>>
>> #set($class = $doc.getObject("XWiki.CharacterClass").xWikiClass)
>> class=${class}
>>
>>
>> which gives me
>>
>>
>> obj=${obj}
>>
>> class=${class}
>>
>>
>>
>> in the output which probably means that it can't look up the class via
>> getObject(). Any ideas what could be wrong, now?
>
>
> Are you sure you have an Object of type "XWiki.CharacterClass" added to your
> page?

I just clicked on the buttons in the order the tutorial and the text  
on the wiki pages told me. I'm not aware that I created an instance of  
the class, yet. What I'm sure is that the class got created (coz I can  
add properties to it) and I copied the name of the class with  
cut&paste from the "edit properties for class ...." page.

How can I check that this object exists?

How can I add one if it doesn't exist?

Or rather: Can someone, who knows XWiki for more than five minutes  
(like me) spend an hour to follow the FAQ tutorial and make it work  
with XWiki 1.9?

I mean that was *the* feature which Vincent proudly presented at the  
Jazoon and it's *completely* broken with the current *release*! Guys,  
please, this must not happen!

With OSS, you get only a single chance to piss people off forever.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Asiri Rathnayake
Hi,

I just clicked on the buttons in the order the tutorial and the text
> on the wiki pages told me. I'm not aware that I created an instance of
> the class, yet. What I'm sure is that the class got created (coz I can
> add properties to it) and I copied the name of the class with
> cut&paste from the "edit properties for class ...." page.
>
> How can I check that this object exists?
>
> How can I add one if it doesn't exist?


Select Edit-> Objects.

Usually there is always an object of type "XWiki.TagClass" added to your
page by default.

Other than this, in your case there should be an Object of type
"XWiki.CharacterClass" also present on the document for following code to
work:

<code>
#set($obj = $doc.getObject("XWiki.CharacterClass"))
obj=${obj}

#set($class = $doc.getObject("XWiki.CharacterClass").xWikiClass)
class=${class}
</code>

If no such object is present, use the 'Add Object' panel on the right side
(Edit->Object view) to add an object. If you have a class named
"XWiki.CharacterClass" correctly created, it should appear on the list of
classes on the 'Add Object' panel.


>
>
> Or rather: Can someone, who knows XWiki for more than five minutes
> (like me) spend an hour to follow the FAQ tutorial and make it work
> with XWiki 1.9?
>
> I mean that was *the* feature which Vincent proudly presented at the
> Jazoon and it's *completely* broken with the current *release*! Guys,
> please, this must not happen!
>
> With OSS, you get only a single chance to piss people off forever.
>

Give me 10 mins, I'm trying the tutorial now :)

Thanks.

- Asiri
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Asiri Rathnayake
Hi,


Or rather: Can someone, who knows XWiki for more than five minutes

>> (like me) spend an hour to follow the FAQ tutorial and make it work
>> with XWiki 1.9?
>>
>> I mean that was *the* feature which Vincent proudly presented at the
>> Jazoon and it's *completely* broken with the current *release*! Guys,
>> please, this must not happen!
>>
>> With OSS, you get only a single chance to piss people off forever.
>>
>
> Give me 10 mins, I'm trying the tutorial now :)
>

Ok, I just tried the tutorial on 2.0-SNAPSHOT and it works ok except for the
syntax change. You need to make sure the page syntax is set to xwiki/1.0.

So, when you complete the tutorial there should be three wiki pages created:

1. One document for the Class definition (FAQs.FAQClass)

2. One document for the sheet (FAQs.FAQClassSheet)

3. One document for the template (FAQs.FAQClassTemplate)

Questions for you:

1. Do you have all these three documents?
2. Are the syntax of all these documents set to xwiki/2.0

3. On the sheet & template, are you sure you have the correct wiki code?
That is sheet document should be referring the correct class document
(FAQs.FAQClass) and the template document should be referring the correnct
sheet document (FAQs.FAQSheet).

Thanks.

- Asiri
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Asiri Rathnayake
>
>
> 2. Are the syntax of all these documents set to xwiki/2.0
>

Correction, xwiki/1.0

Thanks.

- Asiri
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

digulla
In reply to this post by Asiri Rathnayake
Zitat von Asiri Rathnayake <[hidden email]>:

>> Give me 10 mins, I'm trying the tutorial now :)
> Ok, I just tried the tutorial on 2.0-SNAPSHOT and it works ok except for the
> syntax change. You need to make sure the page syntax is set to xwiki/1.0.

Thanks for the effort. I'll give this a try this afternoon and let you  
know what I get plus I'll post the wiki code.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

digulla
In reply to this post by Asiri Rathnayake
Asiri Rathnayake schrieb:

> So, when you complete the tutorial there should be three wiki pages created:
>
> 1. One document for the Class definition (FAQs.FAQClass)
>
> 2. One document for the sheet (FAQs.FAQClassSheet)
>
> 3. One document for the template (FAQs.FAQClassTemplate)
>
> Questions for you:
>
> 1. Do you have all these three documents?
> 2. Are the syntax of all these documents set to xwiki/2.0
>
> 3. On the sheet & template, are you sure you have the correct wiki code?
> That is sheet document should be referring the correct class document
> (FAQs.FAQClass) and the template document should be referring the correnct
> sheet document (FAQs.FAQSheet).

Okay, I think I got it now: After creating the class and the sheet, the
document you see is empty (the sheet). This is confusing since the class
exists and it has properties, so why is XWiki not displaying them?

IMHO, it would be better to automatically create the sheet and template
along with the class and attach an object of the class with the template
right away. That would allow need a lot less clicks and edits and yield
the same result.

Also, this replacing of names must go. I already entered this
information and XWiki should use it (instead of having me to reenter it
three times).

Lastly, adding another property should not throw away the edits I made
to existing properties.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://darkviews.blogspot.com/          http://www.pdark.de/
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

vmassol
Administrator
Hi Aaron,

On Jun 26, 2009, at 10:25 PM, Aaron Digulla wrote:

> Asiri Rathnayake schrieb:
>
>> So, when you complete the tutorial there should be three wiki pages  
>> created:
>>
>> 1. One document for the Class definition (FAQs.FAQClass)
>>
>> 2. One document for the sheet (FAQs.FAQClassSheet)
>>
>> 3. One document for the template (FAQs.FAQClassTemplate)
>>
>> Questions for you:
>>
>> 1. Do you have all these three documents?
>> 2. Are the syntax of all these documents set to xwiki/2.0
>>
>> 3. On the sheet & template, are you sure you have the correct wiki  
>> code?
>> That is sheet document should be referring the correct class document
>> (FAQs.FAQClass) and the template document should be referring the  
>> correnct
>> sheet document (FAQs.FAQSheet).
>
> Okay, I think I got it now: After creating the class and the sheet,  
> the
> document you see is empty (the sheet). This is confusing since the  
> class
> exists and it has properties, so why is XWiki not displaying them?

I don't understand what you mean. The sheet doesn't contain any class.

> IMHO, it would be better to automatically create the sheet and  
> template
> along with the class and attach an object of the class with the  
> template
> right away. That would allow need a lot less clicks and edits and  
> yield
> the same result.

This class wizards stuff is just a small application to help you  
creating classes. The notion of sheets and templates are also not core  
constructs. In lots of cases you don't even need them. It really  
depend what you're doing. If everything was hidden it would be nice  
and automagical but you wouldn't understand what you're doing.

Still I agree that we would need to work on the class wizard  
application. It hasn't been touched for years and would greatly  
benefit from a big overhaul.

> Also, this replacing of names must go. I already entered this
> information and XWiki should use it (instead of having me to reenter  
> it
> three times).

Yes, I agree.

> Lastly, adding another property should not throw away the edits I made
> to existing properties.

It doesn't for me. This is actually what I did in the demo at jazoon:  
I created several properties before click on save.

Thanks
-Vincent

PS: Keep sending feedback and ideas (even though we're aware of most  
of them - what we really need are patches to progress  ;)).

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9 and 2.0M1

Asiri Rathnayake
In reply to this post by digulla
Hi Aaron,

On Sat, Jun 27, 2009 at 1:55 AM, Aaron Digulla <[hidden email]> wrote:

> Asiri Rathnayake schrieb:
>
> > So, when you complete the tutorial there should be three wiki pages
> created:
> >
> > 1. One document for the Class definition (FAQs.FAQClass)
> >
> > 2. One document for the sheet (FAQs.FAQClassSheet)
> >
> > 3. One document for the template (FAQs.FAQClassTemplate)
> >
> > Questions for you:
> >
> > 1. Do you have all these three documents?
> > 2. Are the syntax of all these documents set to xwiki/2.0
> >
> > 3. On the sheet & template, are you sure you have the correct wiki code?
> > That is sheet document should be referring the correct class document
> > (FAQs.FAQClass) and the template document should be referring the
> correnct
> > sheet document (FAQs.FAQSheet).
>
> Okay, I think I got it now: After creating the class and the sheet, the
> document you see is empty (the sheet). This is confusing since the class
> exists and it has properties, so why is XWiki not displaying them?


Because a 'sheet' (as described in the tutorial) is only a presentation
template for an _OBJECT_ of a specific class. So, if you do not have an
object of a class attached to that page you won't see any output.

Think of it like this:

1. You create a class XWiki.MyClass

2. You create a 'sheet' (XWiki.MyClassSheet) that knows how to 'present'
objects of type XWiki.MyClass

3. You create a page (MySpace.MyPage) and add it an object of type
XWiki.MyClass

4. Inside the content of MySpace.MyPage you delegate the presentation of
your XWiki.MyClass object to  XWiki.MyClassSheet. (This is what is done with
the includeForm directive)

5. The 'template' is only part of the class wizard to make (page+object)
creation easier.


I strongly agree with vincent here. Neither 'sheet' nor 'template' are core
constructs of xwiki, they are just part of the class wizard which is an
specific (yet another) application.

For an example, I can do this:

1. I create a class (XWiki.Person)

- Note that it doesn't have to be 'XWiki.PersonClass', although the class
wizard application needs it to be so.

2. I create a web application (html forms) that asks a user to insert "first
name" and "last name" of a person.

3. When the user submits the form, I create a new 'Object' of type
'XWiki.PersonClass' and add it to the Main.People page (say).

4. Users can add as many person records to Main.People as they wish (using
my application or dierctly by editing objects of Main.People)

5. I create a 'sheet' (XWiki.PeopleDisplay) that can present a list of
(XWiki.Person) objects.

- Again it doesn't have to be XWiki.PersonSheet

- As opposed to the FAQ tutorial, here XWiki.PeopleDisplay is displaying a
"list" of XWiki.Person objects.

6. I include (XWiki.PeopleDisplay) in Main.People page's content
(includeForm).

7. Voila!  When you visit Main.People page, you see a list of persons added
so far. Displayed so nicely by the sheet (XWiki.PeopleDisplay).

8. I can edit the 'sheet' (XWiki.PeopleDisplay) any time I want to chage the
look of the persons list.

9. All of these can be done without compiling a single line of code,
everything is built by editing wiki pages. And if you want, you can put ajax
to the mix!!! (again by editing wiki pages).

10. (9) is what is soooo cool about xwiki :)


I only hope I didn't make your understanding of xwiki worse :)

Thanks.

- Asiri
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

zeljko
In reply to this post by vmassol
Hi,

It still doesn't work in 2.0 RC2.
Reply | Threaded
Open this post in threaded view
|

Re: FAQTutorial broken in 1.9

vmassol
Administrator

On Sep 18, 2009, at 10:29 PM, zeljko wrote:

>
> Hi,
>
> It still doesn't work in 2.0 RC2.

Can you explain what doesn't work?

I've tested the class wizard in 2.0RC2 and it worked fine for me.

Thanks
-Vincent

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
12