On Fri, May 29, 2009 at 3:19 PM, Vincent Massol <vincent(a)massol.net> wrote:
On May 29, 2009, at 3:03 PM, Pascal Voitot wrote:
In the scripts, there are some:
<form
action="$xwiki.getURL("${doc.space}.${class}ClassSheet","edit")"
method="post">
and when you render that inside {{velocity}}{{html}}/{{/html}}{{/
velocity}},
this is quite a problem because it render the $xwiki.getUrl and then
treats
it as wiki syntax and surrounds it with <span>...
This looks like a bug of the HTML macro. Can you create a jira issue?
I will
and you can't remove the wiki=true because in
other part of the
scripts,
there is real wiki syntax...
Actually you can by using clean=false and break it into several html
macros.
what does it do exactly as it's not explained in the macro doc ?
Thanks
-Vincent
What can we do to go around this?
On Fri, May 29, 2009 at 2:51 PM, Pascal Voitot
<pascal.voitot.dev(a)gmail.com>wrote;wrote:
>
>
> On Fri, May 29, 2009 at 2:47 PM, Vincent Massol
> <vincent(a)massol.net>wrote;wrote:
>
>>
>> On May 29, 2009, at 2:42 PM, Pascal Voitot wrote:
>>
>>> On Fri, May 29, 2009 at 2:35 PM, Vincent Massol
>>> <vincent(a)massol.net>
>>> wrote:
>>>
>>>> Hi Pascal,
>>>>
>>>> On May 29, 2009, at 2:25 PM, Pascal Voitot wrote:
>>>>
>>>>> The XWikiClassTemplate velocity script is in a XWiki/1.0 syntax
>>>>> doc:
>>>>> ## 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 = "kmbase.${class}Class")
>>>>> #set($defaultweb = "kmbase")
>>>>> #includeForm("XWiki.ClassSheet")
>>>>>
>>>>> but now when you create a class, it is XWiki/2.0 and should be:
>>>>> {{velocity}}
>>>>> {{html wiki=true}}
>>>>> ## 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 = "kmbase.${class}Class")
>>>>> #set($defaultweb = "kmbase")
>>>>> #includeForm("XWiki.ClassSheet")
>>>>> {{/html}}
>>>>> {{/velocity}}
>>>>>
>>>>> What's the best solution to your mind in order to have something
>>>>> working in
>>>>> all the cases?
>>>>
>>>> The created page will use the syntax of the template page thus it
>>>> should work in all cases.
>>>>
>>>
>>> not sure to understand...
>>> Do you mean if the template is 1.0, the created page should be 1.0
>>> also?
>>
>> yes
>>
>>> Apparently, this is not the case yet, isn't it?
>>
>> It's supposed to be (I coded it ;)).
>>
>> The code is in XWikiDocument.readFromTemplate():
>>
>> // Set the new document syntax as the syntax of
>> the template since the template content
>> // is copied into the new document
>> setSyntaxId(templatedoc.getSyntaxId());
>>
>> Apparently it's not working for you it seems. Please open a jira
>> issue
>> if that's the case.
>>
>> Thanks
>> -Vincent
>>
>
> I recompiled everything from scratch so I should have a good
> release now!
>
> Can you test it to verify? Just create a new class from the
> XWikiClasses
> editor and see if the doc is XWiki/1.0 or 2.0?
>
>
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs