[xwiki-users] documentTree macro fails to render in xwiki 7.2
Hey everyone! I’m having an issue with xwiki 7.2 when rendering the document tree macro. The issue seems to be that the macro is not generating the appropriate HTML. {{documentTree/}} is rendered as (% class='xtree ' ... %)((())) All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders. if I manually add an HTML snippet along the macro through {{html}} <a class="xtree" data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}} this snippet does render does render properly below the badly formatted macro. Any ideas or help are more than welcome! *Juan Martín Sotuyo Dodero* - CTO Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod *Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>*
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the appropriate HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue. Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
This happens consistently on all pages. I initially tried to use the Document Tree macro on Dashboard, but seeing it fail I wrote it in a new empty page and the result is the exact same. This is a recently upgraded wiki from 4.0.0. Other than this (which is a completely new feature coming from 4.0) I've encountered no issues. *Juan Martín Sotuyo Dodero* - CTO Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod *Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* On Tue, Oct 20, 2015 at 7:11 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the appropriate HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue.
Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Tue, Oct 20, 2015 at 2:23 PM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
This happens consistently on all pages. I initially tried to use the Document Tree macro on Dashboard, but seeing it fail I wrote it in a new empty page and the result is the exact same.
What is the syntax of that new empty page? Check in Wiki Edit mode. Can you do the following: open in view mode the wiki page were you put just {{documentTree/}}, then Right Click + View Page Source, look for '<div id="xwikicontent"' and give us the content of this element. Can you also give us the content returned by this URL http://<yourServer>/xwiki/bin/get/TheSpace/ThePage/ ? (replace TheSpace and ThePage with the space and page name of the wiki page that contains only {{documentTree /}}) Thanks, Marius
This is a recently upgraded wiki from 4.0.0. Other than this (which is a completely new feature coming from 4.0) I've encountered no issues.
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>*
On Tue, Oct 20, 2015 at 7:11 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the appropriate HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue.
Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Juan Martín Sotuyo Dodero - CTO Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod Argentina Head Office Viamonte 1181, 3rd fl, CABA, C1053ABW www.monits.com On Tue, Oct 20, 2015 at 12:54 PM, Marius Dumitru Florea < [email protected]> wrote: On Tue, Oct 20, 2015 at 2:23 PM, Juan Martín Sotuyo Dodero <
[email protected]> wrote:
This happens consistently on all pages. I initially tried to use the Document Tree macro on Dashboard, but seeing it fail I wrote it in a new empty page and the result is the exact same.
What is the syntax of that new empty page? Check in Wiki Edit mode.
Tried both XWiki 2.1 and Markdown 1.1 with same results.
Can you do the following: open in view mode the wiki page were you put just {{documentTree/}}, then Right Click + View Page Source, look for '<div id="xwikicontent"' and give us the content of this element.
<div id="xwikicontent" class="col-xs-12"> <p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p> </div>
Can you also give us the content returned by this URL http://<yourServer>/xwiki/bin/get/TheSpace/ThePage/ ? (replace TheSpace and ThePage with the space and page name of the wiki page that contains only {{documentTree /}})
<p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p>
Thanks, Marius
Thank you!
This is a recently upgraded wiki from 4.0.0. Other than this (which is a completely new feature coming from 4.0) I've encountered no issues.
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>*
On Tue, Oct 20, 2015 at 7:11 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the
appropriate
HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue.
Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Please check the syntax of the XWiki.DocumentTree and Macros.Tree pages. Both should have XWiki 2.1 syntax. Open the Macros.Tree page in view mode and check if the tree under the 'Dynamic Tree' section/heading is loading. Then edit the Macros.Tree page in object mode, expand the XWiki.WikiMacroClass object and do the following changes to the 'Macro code' property: * replace {{velocity output="false"}} with {{velocity}} at the start (i.e. remove the output parameter) * replace the line before the closing {{/velocity}} (at the end) with: Syntax: $xwiki.currentContentSyntaxId Output: {{{$output}}} Save and access the page that contains only the {{documentTree/}} macro. Paste here the output. I get for instance: Syntax: xwiki/2.1 Output: (% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((())) You can revert the changes to the Macros.Tree page afterwards. Thanks, Marius On Tue, Oct 20, 2015 at 8:36 PM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Juan Martín Sotuyo Dodero - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
Argentina Head Office Viamonte 1181, 3rd fl, CABA, C1053ABW www.monits.com
On Tue, Oct 20, 2015 at 12:54 PM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 2:23 PM, Juan Martín Sotuyo Dodero <
[email protected]> wrote:
This happens consistently on all pages. I initially tried to use the Document Tree macro on Dashboard, but seeing it fail I wrote it in a new empty page and the result is the exact same.
What is the syntax of that new empty page? Check in Wiki Edit mode.
Tried both XWiki 2.1 and Markdown 1.1 with same results.
Can you do the following: open in view mode the wiki page were you put just {{documentTree/}}, then Right Click + View Page Source, look for '<div id="xwikicontent"' and give us the content of this element.
<div id="xwikicontent" class="col-xs-12"> <p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p> </div>
Can you also give us the content returned by this URL http://<yourServer>/xwiki/bin/get/TheSpace/ThePage/ ? (replace TheSpace and ThePage with the space and page name of the wiki page that contains only {{documentTree /}})
<p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p>
Thanks, Marius
Thank you!
This is a recently upgraded wiki from 4.0.0. Other than this (which is
a
completely new feature coming from 4.0) I've encountered no issues.
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>*
On Tue, Oct 20, 2015 at 7:11 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the appropriate HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true"
data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&'
data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue.
Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Thanks for your help! The Macro.Tree and XWiki.DocumentTree are both in XWiki 2.1 syntax. However, when rendered, with the suggested changes it said it was using Markdown 1.1 to render it. I figured the issue was down to me setting: #-# [Since 1.8RC2] #-# Specifies the default syntax to use when creating new documents. #-# Default value is xwiki/2.1. core.defaultDocumentSyntax = markdown/1.1 in xwiki.properties, but that setting should only affect new documents, not rendering of installed macros documents in other syntaxes. Seems like a bug to me (or at least a misleading comment on the property). I reverted the config change to use xwiki/2.1 as default and it’s rendering properly now. Also of note, setting the default wiki syntax to markdown/1.1 through Admin
XWiki.XWikiPreferences also breaks the macro.
People manually choosing markdown/1.1 at the moment of creating a page however do NOT break the rendering of the macro. Seems there is no sane way to set a default syntax for documents being created within the wiki without breaking the macro. Hope this helps other people too, and maybe even see it fixed in the next release. Juan Martín Sotuyo Dodero - CTO Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod Argentina Head Office Viamonte 1181, 3rd fl, CABA, C1053ABW www.monits.com On Wed, Oct 21, 2015 at 5:20 AM, Marius Dumitru Florea < [email protected]> wrote: Please check the syntax of the XWiki.DocumentTree and Macros.Tree pages.
Both should have XWiki 2.1 syntax.
Open the Macros.Tree page in view mode and check if the tree under the 'Dynamic Tree' section/heading is loading.
Then edit the Macros.Tree page in object mode, expand the XWiki.WikiMacroClass object and do the following changes to the 'Macro code' property:
* replace {{velocity output="false"}} with {{velocity}} at the start (i.e. remove the output parameter) * replace the line before the closing {{/velocity}} (at the end) with:
Syntax: $xwiki.currentContentSyntaxId Output: {{{$output}}}
Save and access the page that contains only the {{documentTree/}} macro. Paste here the output. I get for instance:
Syntax: xwiki/2.1 Output: (% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))
You can revert the changes to the Macros.Tree page afterwards.
Thanks, Marius
On Tue, Oct 20, 2015 at 8:36 PM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Juan Martín Sotuyo Dodero - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
Argentina Head Office Viamonte 1181, 3rd fl, CABA, C1053ABW www.monits.com
On Tue, Oct 20, 2015 at 12:54 PM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 2:23 PM, Juan Martín Sotuyo Dodero <
[email protected]> wrote:
This happens consistently on all pages. I initially tried to use the Document Tree macro on Dashboard, but seeing it fail I wrote it in a new empty page and the result is the exact same.
What is the syntax of that new empty page? Check in Wiki Edit mode.
Tried both XWiki 2.1 and Markdown 1.1 with same results.
Can you do the following: open in view mode the wiki page were you put just {{documentTree/}}, then Right Click + View Page Source, look for '<div id="xwikicontent"' and give us the content of this element.
<div id="xwikicontent" class="col-xs-12"> <p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p> </div>
Can you also give us the content returned by this URL http://<yourServer>/xwiki/bin/get/TheSpace/ThePage/ ? (replace TheSpace and ThePage with the space and page name of the wiki page that contains only {{documentTree /}})
<p>(% class='xtree ' data-responsive="true" data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&' data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false' %)((()))</p>
Thanks, Marius
Thank you!
This is a recently upgraded wiki from 4.0.0. Other than this (which
is a
completely new feature coming from 4.0) I've encountered no issues.
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>*
On Tue, Oct 20, 2015 at 7:11 AM, Marius Dumitru Florea < [email protected]> wrote:
On Tue, Oct 20, 2015 at 5:59 AM, Juan Martín Sotuyo Dodero < [email protected]> wrote:
Hey everyone!
I’m having an issue with xwiki 7.2 when rendering the document tree macro.
The issue seems to be that the macro is not generating the appropriate HTML.
{{documentTree/}} is rendered as (% class='xtree ' ... %)((()))
All needed JS and CSS files are being pulled but since the JS is looking for <a class="xtree" ...> it just never renders.
if I manually add an HTML snippet along the macro through
{{html}} <a class="xtree" data-responsive="true"
data-url='/xwiki/bin/get/XWiki/DocumentTree?outputSyntax=plain&'
data-dragAndDrop='false' data-contextMenu='false' data-icons='true' data-edges='true' data-checkboxes='false' data-openTo='' data-finder='false'>tree</a> {{/html}}
this snippet does render does render properly below the badly formatted macro.
Any ideas or help are more than welcome!
I just downloaded XWiki 7.2 and I put {{documentTree/}} on a new wiki page. The tree loads fine as expected. Can you reproduce the issue on a new wiki page? Your problem may be related to the context where you use the Document Tree Macro. Can you give us the full content of the page where you have this issue? Or at least try to reduce the problem by removing content that is not needed to reproduce the issue.
Thanks, Marius
*Juan Martín Sotuyo Dodero* - CTO
Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod
*Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Juan, On 21 Oct 2015 at 17:20:08, Juan Martín Sotuyo Dodero ([email protected](mailto:[email protected])) wrote:
Thanks for your help!
The Macro.Tree and XWiki.DocumentTree are both in XWiki 2.1 syntax.
However, when rendered, with the suggested changes it said it was using Markdown 1.1 to render it.
I figured the issue was down to me setting:
#-# [Since 1.8RC2] #-# Specifies the default syntax to use when creating new documents. #-# Default value is xwiki/2.1.
core.defaultDocumentSyntax = markdown/1.1
in xwiki.properties, but that setting should only affect new documents, not rendering of installed macros documents in other syntaxes. Seems like a bug to me (or at least a misleading comment on the property).
It is a bug! Would be great if you could create a jira issue at http://jira.xwiki.org for this <for xwiki devs> I’ve started analyzing the issue and the problem is: * In WikiMacroExecutionEventListener.onWikiMacroExecutionStartsEvent(), we call SUExecutorContext sucontext = this.suExecutor.before(wikiMacro.getAuthorReference()) which creates a *new* document (and thus with the default syntax, i.e. markdown/1.1!!) and sets the sdoc to be SUSpace.SUPage. * Then in the Tree Macro (in Macros.Tree) we do: #set ($xcontext.macro.result = $services.rendering.parse($output, $xwiki.currentContentSyntaxId).children). This calls getCurrentContentSyntaxId() which extracts the syntax from the sdoc. Thus I think we need to either change SUExecutor or modify getCurrentContentSyntaxId(). We need to decide if the only thing we do with an sdoc is getting its author or if we also use that to retrieve other data (such as the syntax)… I’ll defer to Thomas since he’s the one who wrote SUExecutor </for xwiki devs> Thanks -Vincent [snip]
Great, issue has been reported: http://jira.xwiki.org/browse/XWIKI-12723 Thanks for your assistance. *Juan Martín Sotuyo Dodero* - CTO Office: +54.11 - 5217.7850 Mobile: +54.911 - 3684.5544 Skype: jsotuyod *Argentina Head Office* Viamonte 1181, 3rd fl, CABA, C1053ABW *www.monits.com <http://www.monits.com/>* On Wed, Oct 21, 2015 at 2:28 PM, [email protected] <[email protected]> wrote:
Hi Juan,
On 21 Oct 2015 at 17:20:08, Juan Martín Sotuyo Dodero ([email protected] (mailto:[email protected])) wrote:
Thanks for your help!
The Macro.Tree and XWiki.DocumentTree are both in XWiki 2.1 syntax.
However, when rendered, with the suggested changes it said it was using Markdown 1.1 to render it.
I figured the issue was down to me setting:
#-# [Since 1.8RC2] #-# Specifies the default syntax to use when creating new documents. #-# Default value is xwiki/2.1.
core.defaultDocumentSyntax = markdown/1.1
in xwiki.properties, but that setting should only affect new documents, not rendering of installed macros documents in other syntaxes. Seems like a bug to me (or at least a misleading comment on the property).
It is a bug! Would be great if you could create a jira issue at http://jira.xwiki.org for this
<for xwiki devs> I’ve started analyzing the issue and the problem is:
* In WikiMacroExecutionEventListener.onWikiMacroExecutionStartsEvent(), we call SUExecutorContext sucontext = this.suExecutor.before(wikiMacro.getAuthorReference()) which creates a *new* document (and thus with the default syntax, i.e. markdown/1.1!!) and sets the sdoc to be SUSpace.SUPage. * Then in the Tree Macro (in Macros.Tree) we do: #set ($xcontext.macro.result = $services.rendering.parse($output, $xwiki.currentContentSyntaxId).children). This calls getCurrentContentSyntaxId() which extracts the syntax from the sdoc.
Thus I think we need to either change SUExecutor or modify getCurrentContentSyntaxId(). We need to decide if the only thing we do with an sdoc is getting its author or if we also use that to retrieve other data (such as the syntax)…
I’ll defer to Thomas since he’s the one who wrote SUExecutor </for xwiki devs>
Thanks -Vincent
[snip]
participants (3)
-
Juan Martín Sotuyo Dodero -
Marius Dumitru Florea -
vincent@massol.net