Defect #44164
closedEdit link is missing or incorrect in Wiki pages with the collapse macro
Description
When using a collapsible section in a Wiki page, the "Edit" link behavior is incorrect for sections inside the collapse macro.
Steps to reproduce¶
1. Create a Wiki page with multiple sections:
# Wiki
## Section A
collapsed section
{{collapse(
## Section B
)}}
## Section C
2. Save the page
3. Check the edit icons displayed on the right side of each section header
4. Expand "Section B"
Expected result¶
- Each section should have its own "Edit" link
- The edit link should target the correct section (e.g.
edit?section=3for Section B) - The edit link should be available when the section is expanded
Actual result¶
- The edit link for Section B is missing
- The edit link for Section C points to the wrong section (
edit?section=3instead of the expectededit?section=4)
Notes¶
This issue occurs when a section is wrapped inside a {{collapse(...)}} macro block.
It seems that sections inside the collapse macro are not correctly counted or indexed when generating section edit links.
Files
Related issues
Updated by Yasu Saku about 1 month ago
I noticed that the example of the collapse macro usage in the description was incorrect. Sorry for the confusion.
The correct markup is as follows:
# Wiki
## Section A
collapsed section
{{collapse()
## Section B
}}
## Section C
Updated by Marius BĂLTEANU about 1 month ago
- Is duplicate of Defect #13723: Collapse doesn't work with section edit link added
Updated by Marius BĂLTEANU about 1 month ago
- Status changed from New to Closed
- Resolution set to Duplicate
Thanks for reporting this issue.
I'm closing this in favour of #13723, I think it's the same.
Updated by Marius BĂLTEANU about 1 month ago
A fix was posted to #13723 and now I've added also a test, please take a look.
Updated by Yasu Saku about 1 month ago
Marius BĂLTEANU
Thanks for your response.
I understand.