Problem/Motivation

When using footnote summary as a token in metatag, duplicate footnotes appear in the footnotes group block. Detailed in https://www.drupal.org/project/footnotes/issues/3428596#comment-15544562

Steps to reproduce

  1. Install Drupal 10.1 latest
  2. Install metatag module
  3. Enable footnotes in CKE 5 (Set to collapse duplicates and set block rendering)
  4. Set the Footnotes group block in the content region
  5. Create the metatag field for the basic page content type
  6. Create a new page with some content in the body field and leave the summary empty (Have the summary be generated for you)
  7. Add some footnotes to the body field and save the page
  8. The duplicates should appear

Proposed resolution

Refactor grouping.

Remaining tasks

Merge request

User interface changes

None

API changes

None

Data model changes

None

Issue fork footnotes-3440429

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scott_euser created an issue. See original summary.

scott_euser’s picture

Status: Active » Needs review

Okay this solves it in my testing. The old Group code I took from the patches when that functionality was originally created, but it was far too difficult to read and follow the logic. This now is at least a bit more readable without changing the structure and allowed me to find duplicates based on the text, yet still keep the references unique for back-links. Let's see if the tests flag any regressions, otherwise I'll get a test added for this.

scott_euser’s picture

Status: Needs review » Needs work

  • scott_euser committed 3690ca2f on 4.0.x
    Issue #3440429: Duplicate footnotes when using footnote summary in...
scott_euser’s picture

Assigned: scott_euser » Unassigned
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.