Citations are not reused when collapsing footnotes across multiple fields

Created on 18 April 2025, 14 days ago

Problem/Motivation

The 'Collapse footnotes with identical content' option works, as in that identical references don't appear multiple times in the grouped footer. There's one problem though: when an identical footnote is found in a subsequent text field, its reference isn't added to the footer again but its citation is renumbered, causing it to link to a non-existing reference.

Steps to reproduce

Add an identical footnote to a field different than the original one, with collapsing and grouping enabled.

Proposed resolution

In \Drupal\footnotes\Plugin\Filter\FootnotesFilter::getMatchingFootnoteKey(), don't just check the footnotes of the current filter. Check footnotes from the group as well.

🐛 Bug report
Status

Active

Version

4.0

Component

Footnotes

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024