Page MenuHomePhabricator

Duplicate main ref is being overwritten by VE on edit (M)
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Enter the following wikitext:
<ref details="page 1" name="book">Miller</ref>
<ref details="page 2" name="book">Not Miller</ref>
  • make any change to the page
  • save the page or switch to wikitext

What happens?:
The duplicate main ref content is being overwritten:

image.png (1,267×273 px, 40 KB)

What should have happened instead?:
Both main ref contents should have stayed as they are without subrefs:

image.png (1,267×273 px, 29 KB)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
An alternative solution could be to display an error in VE and prevent editing for this incorrect wikitext in VE, similar to the way VE handles templates in the reflist. We estimate this with S.

See also T392814: [Bug] VE renders the conflicting main content as sub-ref instead of ignoring it.

Event Timeline

Change #1326120 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] WIP: Don't override duplicate main+details main content

https://gerrit.wikimedia.org/r/1326120

lilients_WMDE renamed this task from Duplicate main ref is being overwritten by VE on edit to Duplicate main ref is being overwritten by VE on edit (M).Aug 21 2026, 8:24 AM
lilients_WMDE updated the task description. (Show Details)

Change #1326120 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Don't override duplicate main+details main content

https://gerrit.wikimedia.org/r/1326120

Change #1336018 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Remove leftover comment when avoiding content override

https://gerrit.wikimedia.org/r/1336018

Change #1336018 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Remove leftover comment when avoiding content override

https://gerrit.wikimedia.org/r/1336018

Tobi_WMDE_SW claimed this task.