This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-e1be792b-77d4-423b-a2bb-b2b1ced1e96c XWIKI-22609 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-453cc003-bc84-4f0d-801d-2d79c2c0445d slauriere created this issue on 25/Oct/24 12:17
 
Summary: TOC is missing headings generated by macros when referencing a page different from the current one
Issue Type: cid:jira-generated-image-avatar-e1be792b-77d4-423b-a2bb-b2b1ced1e96c Bug
Affects Versions: 16.4.4
Assignee: Unassigned
Created: 25/Oct/24 12:17
Priority: cid:jira-generated-image-static-major-2f6fd4e0-0c5b-4ce5-9490-78307b636c4f Major
Reporter: slauriere
Description:

Steps to reproduce

1. Create Page-A.WebHome with following content:

{{toc/}}

== Section 1 ==

== Section 2 ==

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

== Section 1000 ==

{{/velocity}}

The generated TOC contains the 5 sections headings, as expected

2. Create Page-B.WebHome with following content:

{{toc reference="Page-B.WebHome"/}}

Expected result

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

Actual result

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

  • Section 1
  • Section 2