While rewriting the Cite extension, we tiptoed around two edge cases for the follow feature (see manual). This is something used on Wikisource when splitting long footnotes broken across pages in the published document. The PHP implementation of that feature causes considerable technical debt in Cite, this task's scope is to cleaned up most of the debt, or documented a path to fixing in the future. Don't change behavior if possible, but if there are changes please announce them as part of this task.
Existing logic:
- In normal usage, <ref name="first">First text</ref> will precede <ref follow="first">Second text</ref>, producing a footnote marker for only the first reference, and the text "First text Second text" in the references section.
- If the two refs are swapped so that follow comes before the "main" ref, the output will be broken. We won't show a footnote mark in the article body, but the follow ref's text will appear at the top of the references section, without any red error indicators. This is different than how any other erroring ref is handled, it seems justifiable to at least paint as an error, or make fully consistent with the other error types.
- There are a ton of smaller edge cases, which may or may not be worth listing here.
Decision
After the in-depth investigation in T240858#5777804 we believe the current behavior was never a formal requirement, but an arbitrary fallback the original developer came up with, but a fallback that's not even relevant in production. We decided to consider the behavior a bug and fix it. The misplaced follow will not be displayed any more on top of the references list, but instead show an error in-place.
TechNews
Suggested wording for the User-notice: