Duplicate footnotes when using footnote summary in metatag

Created on 12 April 2024, 7 months ago
Updated 30 April 2024, 7 months ago

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 🐛 Footnotes repeating Needs work

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

🐛 Bug report
Status

Fixed

Version

4.0

Component

Footnotes

Created by

🇬🇧United Kingdom scott_euser

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

Comments & Activities

  • Issue created by @scott_euser
  • @scott_euser opened merge request.
  • Status changed to Needs review 7 months ago
  • 🇬🇧United Kingdom scott_euser

    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.

  • Status changed to Needs work 7 months ago
    • scott_euser committed 3690ca2f on 4.0.x
      Issue #3440429: Duplicate footnotes when using footnote summary in...
  • Issue was unassigned.
  • Status changed to Fixed 7 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024