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..

CommentFileSizeAuthor
#2 make_random_ids_optional-3450120_1.patch3.18 KBjohn_b

Issue fork footnotes-3450120

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

John_B created an issue. See original summary.

john_b’s picture

Status: Active » Needs review
StatusFileSize
new3.18 KB

Attached 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.

rudolfbyker’s picture

I 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.

scott_euser’s picture

Status: Needs review » Needs work

Can 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!

scott_euser’s picture

Version: 3.1.x-dev » 4.0.x-dev

scott_euser changed the visibility of the branch 3450120-make-footnote-link-consistent to hidden.

scott_euser’s picture

Okay 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.

scott_euser’s picture

Status: Needs work » Needs review

Okay this is now ready, let me know if it works for you

dieterholvoet’s picture

Status: Needs review » Reviewed & tested by the community

For me this fixes the issue where links from citations to grouped references at the bottom of the page weren't working anymore.

dieterholvoet’s picture

Status: Reviewed & tested by the community » Needs work

Never mind, that doesn't fix it. I now have citations that link to #footnote1, while the footnote has an ID of footnote1-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.