[xwiki-users] Syntax Guide Page doesn't work because of 'Failed to execute the [velocity] macro'
Hello together, I don't know why, but since I upgraded to 6.0 (6.0.1) I cannot launch the Syntax Guide (XWiki.XWikiSyntax). I just get an Failed to execute the [velocity] macro error and that's it. Here you will find the complete error message-> http://mysticpaste.com/view/z6rrmr8o91?2 I have a clone of the XWiki instance where I don't have this problem but there the content is shown twice. I compare both pages and for me they are the same, same content, same objects, same classes. Where can I look or test whre this problem is coming from? Best regards Kai -- View this message in context: http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'get' in class java.util.ArrayList threw exception java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at xwiki:XWiki.XWikiSyntax[line 72, column 198] The line is: #set($child = {'id' : $sectionDoc.getName().substring(11), 'minSyntax' : $obj.getProperty("minSyntaxVersion").value, 'maxSyntax' : $obj.getProperty("maxSyntaxVersion").value, 'name' : $sectionList.get(1).getSectionTitle()}) The problem being with: $sectionList.get(1).getSectionTitle() which assumes there are at least 2 sections (headings) in each document that defines a 'section' of the syntax page. The first section specifies the Category Name, and the second section specifies the syntax 'Section' name. There is something wrong with one of your document that define a syntax 'section'. See https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwik... for the list of syntax 'sections'. A quick fix is to import the http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-help-ui/6.... into your wiki in order to reset the syntax page. Hope this helps, Marius On Tue, Jun 10, 2014 at 10:17 AM, -bt- <kais3n@gmail.com> wrote:
Hello together,
I don't know why, but since I upgraded to 6.0 (6.0.1) I cannot launch the Syntax Guide (XWiki.XWikiSyntax). I just get an Failed to execute the [velocity] macro error and that's it. Here you will find the complete error message-> http://mysticpaste.com/view/z6rrmr8o91?2
I have a clone of the XWiki instance where I don't have this problem but there the content is shown twice.
I compare both pages and for me they are the same, same content, same objects, same classes.
Where can I look or test whre this problem is coming from?
Best regards Kai
-- View this message in context: http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Hello Marius, thanks for your fast answer. I tried it but it still doesn't work. I also tried to delete some pages as the where not replaced by the import. For test I setup a new machine with a vanilla xwiki 6.0.1 and import the content from the other system. There it is working, with just one problem. The Guide show all Headlines twice. This happen also on a complete other virgin system as soon as I active the multilingual feature... Best regards Kai -- View this message in context: http://xwiki.475771.n2.nabble.com/Syntax-Guide-Page-doesn-t-work-because-of-... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 06/10/2014 05:34 PM, -bt- wrote:
Hello Marius,
thanks for your fast answer. I tried it but it still doesn't work. I also tried to delete some pages as the where not replaced by the import.
For test I setup a new machine with a vanilla xwiki 6.0.1 and import the content from the other system. There it is working, with just one problem. The Guide show all Headlines twice. This happen also on a complete other virgin system as soon as I active the multilingual feature...
I have no idea about the first issue, but at least I know about that one If you look into XWiki.XWikiSyntax in the wiki-editor, you should be able to find a line like: #set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').execute()) if you replace it by: #set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').addFilter('unique').execute()) the duplicates go away. I am somewhat guilty of the complete contraption but I still have not figured out why the duplicates creep up "sometimes" (actually the addFilter('currentlanguage') should prevent that ...) hth, clemens
On Wed, Jun 11, 2014 at 1:51 PM, Clemens Klein-Robbenhaar <c.robbenhaar@espresto.com> wrote:
On 06/10/2014 05:34 PM, -bt- wrote:
Hello Marius,
thanks for your fast answer. I tried it but it still doesn't work. I also tried to delete some pages as the where not replaced by the import.
For test I setup a new machine with a vanilla xwiki 6.0.1 and import the content from the other system. There it is working, with just one problem. The Guide show all Headlines twice. This happen also on a complete other virgin system as soon as I active the multilingual feature...
I have no idea about the first issue, but at least I know about that one
If you look into XWiki.XWikiSyntax in the wiki-editor, you should be able to find a line like:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').execute())
if you replace it by:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').addFilter('unique').execute())
the duplicates go away.
I am somewhat guilty of the complete contraption but I still have not figured out why the duplicates creep up "sometimes" (actually the addFilter('currentlanguage') should prevent that ...)
Could be related to http://jira.xwiki.org/browse/XWIKI-10384 . Thanks, Marius
hth, clemens
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On Wed, Jun 11, 2014 at 2:47 PM, Marius Dumitru Florea <mariusdumitru.florea@xwiki.com> wrote:
On Wed, Jun 11, 2014 at 1:51 PM, Clemens Klein-Robbenhaar <c.robbenhaar@espresto.com> wrote:
On 06/10/2014 05:34 PM, -bt- wrote:
Hello Marius,
thanks for your fast answer. I tried it but it still doesn't work. I also tried to delete some pages as the where not replaced by the import.
For test I setup a new machine with a vanilla xwiki 6.0.1 and import the content from the other system. There it is working, with just one problem. The Guide show all Headlines twice. This happen also on a complete other virgin system as soon as I active the multilingual feature...
I have no idea about the first issue, but at least I know about that one
If you look into XWiki.XWikiSyntax in the wiki-editor, you should be able to find a line like:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').execute())
if you replace it by:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').addFilter('unique').execute())
the duplicates go away.
I am somewhat guilty of the complete contraption but I still have not figured out why the duplicates creep up "sometimes" (actually the addFilter('currentlanguage') should prevent that ...)
Could be related to http://jira.xwiki.org/browse/XWIKI-10384 .
I confirm it's the same issue, and it's indeed related to the 'currentlanguage' which returns both the translation corresponding to the current language and the default translation.
Thanks, Marius
hth, clemens
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Am 11.06.2014 16:26, schrieb Marius Dumitru Florea:
On Wed, Jun 11, 2014 at 2:47 PM, Marius Dumitru Florea <mariusdumitru.florea@xwiki.com> wrote:
On Wed, Jun 11, 2014 at 1:51 PM, Clemens Klein-Robbenhaar <c.robbenhaar@espresto.com> wrote:
On 06/10/2014 05:34 PM, -bt- wrote:
Hello Marius,
thanks for your fast answer. I tried it but it still doesn't work. I also tried to delete some pages as the where not replaced by the import.
For test I setup a new machine with a vanilla xwiki 6.0.1 and import the content from the other system. There it is working, with just one problem. The Guide show all Headlines twice. This happen also on a complete other virgin system as soon as I active the multilingual feature... I have no idea about the first issue, but at least I know about that one
If you look into XWiki.XWikiSyntax in the wiki-editor, you should be able to find a line like:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').execute())
if you replace it by:
#set($results = $services.query.xwql('from doc.object(XWiki.XWikiSyntaxClass) as syntax order by syntax.category, syntax.section').addFilter('currentlanguage').addFilter('unique').execute())
the duplicates go away.
I am somewhat guilty of the complete contraption but I still have not figured out why the duplicates creep up "sometimes" (actually the addFilter('currentlanguage') should prevent that ...) Could be related to http://jira.xwiki.org/browse/XWIKI-10384 . I confirm it's the same issue, and it's indeed related to the 'currentlanguage' which returns both the translation corresponding to the current language and the default translation.
Thanks, Marius
hth, clemens
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Thanks for your answers regarding the second problem. Changing the #set($results fixied it. For the first one I found it myself. It happen if you change the option 'xwiki.section.depth=' from '2' to '1' in the xwiki.cfg.
Best regards Kai
[...]
Thanks for your answers regarding the second problem. Changing the #set($results fixied it. For the first one I found it myself. It happen if you change the option 'xwiki.section.depth=' from '2' to '1' in the xwiki.cfg.
Ah, ok, that's why. I can reproduce the problem when I change that setting. Tracking the issue at http://jira.xwiki.org/browse/XWIKI-10462 until I find a solution for it. Cheers Clemens
participants (4)
-
-bt- -
Clemens Klein-Robbenhaar -
Kai Sen -
Marius Dumitru Florea