Page MenuHomePhabricator

Creating a sub-reference in VisualEditor leads to sub-ref details saved as main ref content if the main ref is defined within a template
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

  • Create a test page (on dewiki or any other wiki using sub-references) with the following wikitext
{{Infobox Organisation
|Name=<ref name="Test">Example</ref>
}}
Content.<ref name="Test" />

== References ==
<references />

-> https://de.wikipedia.org/w/index.php?title=Benutzer:Johannes_Richter_(WMDE)/Test11&oldid=265795643

Screenshot from 2026-04-01 16-03-17.png (651×1 px, 75 KB)

  • Copy and paste the footnote [1] next to "Content"
  • Add sub-reference details to the first instance of that re-used reference outside of the template

What happens?:

  • Everything works as expected while re-using the reference

Screenshot from 2026-04-01 15-57-03.png (651×1 px, 90 KB)

  • Adding sub-ref details works as well

Screenshot from 2026-04-01 16-03-54.png (651×1 px, 73 KB)

Screenshot from 2026-04-01 16-03-58.png (651×1 px, 77 KB)

Screenshot from 2026-04-01 16-04-05.png (651×1 px, 93 KB)

  • Save the edit and notice the reference error, because the main ref has been defined 2x now (with different content)

Screenshot from 2026-04-01 16-04-19.png (651×1 px, 85 KB)

-> https://de.wikipedia.org/w/index.php?title=Benutzer:Johannes_Richter_(WMDE)/Test11&oldid=265795740

{{Infobox Organisation
|Name=<ref name="Test">Example</ref>
}}
Content.<ref name="Test" details="Test2">Test2</ref><ref name="Test" />

== References ==
<references></references>
  • Edit the page again and notice that VE now shows the initial main ref content (even though that's still defined within a template)

Screenshot from 2026-04-01 16-04-24.png (651×1 px, 57 KB)

What should have happened instead?:

  • Don't copy sub-ref details as main ref content
{{Infobox Organisation
|Name=<ref name="Test">Example</ref>
}}
Content.<ref name="Test" details="Test2" /><ref name="Test" />

== References ==
<references></references>
  • Don't show the initial main ref content in VE when editing again while there are two main refs with the same name

Other information:

  • Notice that the issue doesn't appear if you add sub-ref details to the second reference instead – it's just the first re-used reference leading to sub-ref details copied as main ref content.

Screenshot from 2026-04-01 16-03-31.png (651×1 px, 73 KB)

Screenshot from 2026-04-01 16-03-41.png (651×1 px, 90 KB)

Event Timeline