There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-01e4d968-8e8a-4608-ae71-b89517762dd1 XWIKI-22609 Open

TOC is missing headings generated by macros when referencing a page different from the current one

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-c4674871-89d5-47c7-85b1-aa12ee2c92ed Changes by slauriere on 25/Oct/24 13:24
 
Description: h2. Steps to reproduce

h3. 1. Create {{Page-A.WebHome}} with following content:

{code:java}
{{toc/}}

== Section 1 ==

== Section 2 ==

{{velocity}}
#foreach ($section in ['Section 3', 'Section 4'])
== $section ==
#end

== Section 1000 ==

{{/velocity}}
{code}

The generated TOC contains the 5 sections headings, as expected

h3. 2. Create {{Page-B.WebHome}} with following content:

{code:java}
{{toc reference="Page-
B A .WebHome"/}}
{code}

h2. Expected result

The generate TOC in Page-B is the same as the one generated in Page-A.

h2. Actual result

In Page-B, the generated TOC contains only the headings outside the Velocity macro, i.e.:
* Section 1
* Section 2