Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
17.10.2
-
None
-
Unknown
-
Description
Follow these steps to reproduce:
- Create a page with this content:
= Heading = = Heading =
- Create a second page with this content:
= Heading = {{info}} = Heading = {{/info}} - Create a third page that displays the first two:
{{display reference="First.Page" /}} {{display reference="Second.Page" /}} - Check the heading IDs in the rendered HTML
Expected: the heading IDs should be all unique: HHeading, HHeading-1, HHeading-2, HHeading-3
Actual: we get duplicated section IDs: HHeading, HHeading-1, HHeading-2, HHeading-1
The problem doesn't reproduce if we replace the info macro with the velocity macro. This shows that the problem is with macros that support wiki content. The content of these macros is prepared (cached XDOM). The heading from the prepared content gets a generated ID HHeading-1 that is unique in the scope of the second document. But when this prepared content is inserted in the content aggregated from both documents, the ID is not "fixed" (like we do in DocumentContentAsyncExecutor) so it duplicates existing IDs.
Attachments
Issue Links
- causes
-
XWIKI-23943 Section anchors become external links when exported to PDF if the target section heading comes from the content of a macro supporting wiki syntax
-
- Open
-