Defect #44623
closedWiki include() macro adds faulty "Edit this section"-links
Description
Summary¶
Starting with Redmine 7, included sections (via the include() macro) on wiki pages are now displaying the "Edit this section"-link, which are generated after resolving the macros and therefore pointing to the wrong edit page.
On Redmine 6.0.7 the links were not rendered.
On Redmine 7.0.2 the links are generated and as the sections are counting up, the links become unusable, starting with the first included section, see attached screenshots.
Steps to reproduce¶
Wiki Page 1
# Test Wiki
## Some local heading
Local text
{{include(test2:TEST2)}}
## More local heading
More local text
Wiki Page 2 (included in page 1)
# Included Heading 1 ## Included Heading 2 Included text
Environment¶
Environment:
Redmine version 7.0.2.stable
Ruby version 4.0.7-p0 (2026-09-15) [x86_64-linux]
Rails version 8.1.4
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
Redmine settings:
Redmine theme Default
SCM:
Subversion 1.14.5
Mercurial 7.0.1
Bazaar 3.3.11
Git 2.47.3
Filesystem
Redmine plugins:
no plugin installed
Files
Related issues
Updated by Go MAEDA 17 days ago
- Related to Defect #44164: Edit link is missing or incorrect in Wiki pages with the collapse macro added
Updated by Marius BĂLTEANU 15 days ago
- File 0001-fix.patch 0001-fix.patch added
- Assignee set to Marius BĂLTEANU
- Target version set to 7.0.3
The attached patch fixes this by hiding the output of macros while section edit links are parsed, then putting it back before the headings are parsed. Included headings keep their anchors and TOC entries, but they no longer get edit links.
In theory, the change should not break any plugin because the new :sections param is false by default.
Updated by Marius BĂLTEANU 8 days ago
- Status changed from Confirmed to Resolved
- Resolution set to Fixed
Committed the fix.