Problem/Motivation

If there are more than one footnote with the same value (either by manual entry or if a manual value is the same as an automated number), the footnotes are combined but only the first footnote is displayed in the summary.

Steps to reproduce

Using two manual values

  • Add two footnotes with the same value (e.g. 1)
  • Save/view the node
  • Footnote summary will have 1a1b but only the first footnote will be displayed

This is also the case if you add a footnote with a number value that is also generated with the automatic generator

  • Add a footnote with value "1"
  • Add another footnote leaving the value empty
  • Save/view the node
  • Footnote summary will have 1a1b but only the first footnote will be displayed

Proposed resolution

Although the footnotes are combined, this doesn't seem to work properly. If you have multiple same values, this should also be represented in the annotation display (e.g. 1a and 1b instead of both showing as 1). The more important issue is to make sure all the footnotes are combined in the summary. Another thought is that adding letters might not be the desired option.

Suggestion for a setting on how to handle same values. e.g. two footnotes with value 1:

  • number: 1.1, 1.2
  • letter: 1a, 1b
  • symbol: 1*, 1**
  • do nothing: The footer will show two "1" footnotes and the user will then fix it as needed if it was done in error or add their own custom values to have two different values.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 2024-04-12_21-11.png31.53 KBscott_euser

Issue fork footnotes-3440532

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

tklawsuc created an issue. See original summary.

scott_euser’s picture

Thanks for raising the issue - could you provide a screenshot or list of the options you have enabled in the text format?

scott_euser’s picture

Version: 4.0.0-alpha6 » 4.0.x-dev

Thinking about this a bit more, I'm not sure if we should prevent this when manually adding eg "1" twice. What I think we could do though is prevent automated numbering from using a number that is manually added.

tklawsuc’s picture

Are you referring to the filters? I made sure that footnotes is at the top of the list. I also tried this with just the footnotes filter enabled and get the same.
My thought with the options is to allow the user to determine how to handle duplicate values. This would also apply to conflict with manual value and automated numbering. Maybe to keep things simple, you remove that feature all together and treat each entry as it's own in an indexed array and any duplicates will be on the user to resolve. This would be similar to the "do nothing" option I proposed above.

scott_euser’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new31.53 KB

Aha, I see; actually because of how the backlinks are already set up, the smallest change is your 'letter' option like attached

  • 1st two footnotes have the same text so are combined
  • 1 regular footnote
  • 1 footnote numbered 5 with text "Footnote text 5 one"
  • 1 footnote numbered 5 with text "Footnote text 5 two"

Screenshot showing what is described in the text above.

scott_euser’s picture

What do you think? Next step to add tests if you think this solves the problem well enough.

tklawsuc’s picture

I think you are on the right track. Here is my perspective on the duplicate text/values. Let's say you use the auto numbering and add the same footnotes in different places. The link in the body will be "1" for each footnote. But the summary has 1a1b which to me is confusing. I would just expect to have "1" in the summary since the body has "1" for each instance. Similarly for the different content (your example with 5a and 5b), I would add the letter to the body so you can visually see 5a and 5b without having to figure out if the #5 you are looking at in the content area is the a or b reference.

On another note, I also noticed you can't use some punctuations (*, !, #, ^) for the value field which is not clear. You can see it in the editor but when you view the page it reverts to auto-numbering. So the user won't know until they view the content and check for the footnotes. Probably not a deal breaker but there should be something to warn the user. You can however use html entities like †and ‡

scott_euser’s picture

It think starting to modify the body is going to add a lot of complexity I'd rather not do, particularly since this is somewhat edge case already. I would be willing to entertain it if someone else is willing to code it with appropriate test coverage.

What can go into the value manually sounds like you're raising a seperate issue. Do feel free to do so, perhaps you can open a merge request with a suggested change to the field description in the config install folder of the module.

tklawsuc’s picture

Makes sense to me. I like the change you made for the 5a and 5b option to at least show the footnotes where values get duplicated. I would still ask you consider my suggestion about not adding letters for cases where the footnotes are the same and just show the number. Thanks for entertaining my ideas.

scott_euser’s picture

Status: Needs review » Needs work

So leaving the citations untouched and removing the a and b after my 5s from the references section? Yeah I think that should be pretty straightforward.

tklawsuc’s picture

My thoughts are:
- remove a/b where the footnote value and text are the same...like the 1a1b example. So I would just show "1" since the two annotations are referencing the same footnote (1).
- do the separation you started here where values are the same (e.g. the 5 in your sample) but the text is different. Although it might not be ideal where the numbers are both "5" in the body and 5a and 5b in summary, it will at least show the footnote and the user can then decide to change the values if applicable.

scott_euser’s picture

- remove a/b where the footnote value and text are the same...like the 1a1b example. So I would just show "1" since the two annotations are referencing the same footnote (1).

Oh sorry I wasn't really asking about that one, I had just left that in my screenshot - that was the accepted practice our publications team recommended and they do publications for a lot of research organisations. It's theme-able if you want to override that for your own use case. Feel free to raise it as a separate issue in case the wider community wants to debate it, as reference styles like AMA etc don't cover digital so they have the concept of citations and references but do not have backlinks, so there are only opinions on backlinks.

- do the separation you started here where values are the same (e.g. the 5 in your sample) but the text is different. Although it might not be ideal where the numbers are both "5" in the body and 5a and 5b in summary, it will at least show the footnote and the user can then decide to change the values if applicable.

Yes this is in the MR already, just removing a and b from after the 5 will add to the code. This is also not covered by AMA etc as its really a content entry error - editors should either do all manual or all automated. If they choose to mix they do so at own risk. This issue at least helps mitigate one case.

  • scott_euser committed 6435bed2 on 4.0.x
    Issue #3440532 by scott_euser, tklawsuc: Footnotes with same values are...
scott_euser’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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