
Problem/Motivation
Footnote IDs have random strings added since https://drupal.org/node/194558 in order to avoid duplicate IDs on pages which contain more than one node with footnotes. The problem is that with the addition of a random string footnotes no longer have stable IDs which can be linked.
Proposed resolution
Most sites do not have mutliple nodes with footnotes per page. Solution: make the addition of random strings to IDs optional..
Comment | File | Size | Author |
---|---|---|---|
#2 | make_random_ids_optional-3450120_1.patch | 3.18 KB | john_b |
Issue fork footnotes-3450120
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
Comment #2
john_b CreditAttribution: john_b commentedAttached patch adds a checkbox which makes the addition of a radom string to each footnote ID optional. Patch for current dev, does not apply to 3.1.0.
Comment #3
rudolfbykerI also need this. Alternate solution: Use an ID like `node-x-footnote-y` where x is the node ID and y is the footnote's ordinal or value.
Comment #4
scott_euser CreditAttribution: scott_euser as a volunteer and at Soapbox commentedCan switch away from random as long as its unique, e.g. perhaps as @rudolfbyker noted (though I haven't look in depth at implications). In any case needs MR + test coverage to match. Thanks!
Comment #5
scott_euser CreditAttribution: scott_euser as a volunteer and at Soapbox commentedComment #8
scott_euser CreditAttribution: scott_euser as a volunteer and at Soapbox commentedOkay got a chance to hit this issue myself and I I like the suggestion in #4. Since status quo is always random, nobody could yet have a dedicated link to a specific footnote, so I don't think we need to make this opt-in/opt-out. Added comments to the MR to make it clear.
Comment #9
scott_euser CreditAttribution: scott_euser as a volunteer and at Soapbox commentedOkay this is now ready, let me know if it works for you
Comment #10
dieterholvoet CreditAttribution: dieterholvoet at Minsky commentedFor me this fixes the issue where links from citations to grouped references at the bottom of the page weren't working anymore.
Comment #11
dieterholvoet CreditAttribution: dieterholvoet at Minsky commentedNever mind, that doesn't fix it. I now have citations that link to
#footnote1
, while the footnote has an ID offootnote1-0
. That's on a page with multiple text areas with footnotes and with all of them aggregated at the bottom of the page. This issue might be caused by the fact that the same footnote is referenced multiple times on the same page.