Problem/Motivation

when you have 2 or more reference with the same content like,

<footnotes data-text="Same Reference Content" data-value="">&nbsp;</footnotes>
... more text content
<footnotes data-text="Same Reference Content" data-value="">&nbsp;</footnotes>

the references in footnote group block would always link to the first one.

Steps to reproduce

1. install footnotes module
2. add footnote group block to layout with group using javascript enabled
3. add footnote filter to text format
3. Add duplicate references mentioned above

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork footnotes-3624373

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

jiong_ye created an issue. See original summary.

jiong_ye’s picture

Issue summary: View changes
scott_euser’s picture

Hi there, thanks for the report.

Could you provide your footnotes filter plugins yml config (just the footnotes section from the text format to see which settings are on/off).

Can you confirm if you tested using the built in module twig templates?

jiong_ye’s picture

  filter_footnotes:
    id: filter_footnotes
    provider: footnotes
    status: true
    weight: -48
    settings:
      footnotes_collapse: false
      footnotes_css: true
      footnotes_clean_anchors: false
      footnotes_dialog: false
      footnotes_dialog_prevent_bubbling: false
      footnotes_footer_disable: false
      footnotes_preview_show_text: true
      footnotes_preview_character: ''
      footnotes_unique_ids: true

Can you confirm if you tested using the built in module twig templates?
yes

scott_euser’s picture

Status: Active » Needs review

Thanks! Will take a look

scott_euser’s picture

Title: References linked to wrong citation when references content are the same » References linked to wrong citation when references content are the same in Footnotes Group Block with JS Grouping enabled
Issue summary: View changes
scott_euser’s picture

Okay I can see you must have the group with JS option enabled in the footnotes block itself. There are a couple issues with the original MR; particularly if some areas are lazy loaded/big pipe (which is the reason for the JS-based), the context is only the current content, so it'd miss citations already done rendering. I'm also not keen on adding an opt-in option if we are fixing a bug, I think it can be applied directly.

Please try out the new merge request and confirm if it continues to sort the issue for you. It also has failing test coverage reproducing the issue which passes with this code change applied.

Thanks!

scott_euser changed the visibility of the branch 3624373-references-linked-to to hidden.