Page MenuHomePhabricator

VisualEditor expands/duplicates named references
Closed, ResolvedPublicBUG REPORT

Description

I'm assuming this is related to the train rolling today

Lorem<ref name="smth">{{Cite web|...}}</ref> ipsum<ref name="smth" /> dolor<ref name="smth" /> sit amet.<ref name="smth" />

into

Lorem<ref name="smth">{{Cite web|...}}</ref> ipsum<ref name="smth">{{Cite web|...}}</ref> dolor<ref name="smth">{{Cite web|...}}</ref> sit amet.<ref name="smth">{{Cite web|...}}</ref>

causing citation errors. See https://en.wikipedia.org/wiki/Special:Diff/1055956630 and https://en.wikipedia.org/wiki/Special:Diff/1055958474 and https://en.wikipedia.org/w/index.php?title=Cleavage_(breasts)&diff=1055966092&oldid=1054747668

As reported at: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#VisualEditor_duplicating_named_citations

Steps to reproduce:

  1. Open any page with re-used references in visual editor, e.g. https://en.wikipedia.beta.wmflabs.org/wiki/T296044?veaction=edit
  2. Make any change to the page
  3. Click "Publish changes…" → "Review your changes → Wikitext"
  4. Ensure that the diff doesn't make unexpected changes to re-used refs, e.g. <ref name="a" /> stays unchanged

Event Timeline

ping @dduvall @jeena and @brennen as listed deployers for train and patch window tonight

ping @dduvall @jeena and @brennen as listed deployers for train and patch window tonight

Is there a patch associated with this?

brennen triaged this task as Unbreak Now! priority.Nov 19 2021, 12:15 AM

Marking this as a train blocker / UBN, since it appears to be doing active breakage to articles.

ppelberg added a subscriber: ssastry.

I'm tagging Parsoid here as well in case they have insight into what could be causing this issue. cc @ssastry

I do not know why exactly that causes this bug, and I won't investigate at 1 AM, but I confirmed locally that reverting it fixes it.

Change 739834 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Cite@master] Revert \"Use proper method for comparing linear data\"

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

Change 739834 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Revert \"Use proper method for comparing linear data\"

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

Change 739836 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Cite@wmf/1.38.0-wmf.9] Revert \"Use proper method for comparing linear data\"

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

Change 739836 merged by jenkins-bot:

[mediawiki/extensions/Cite@wmf/1.38.0-wmf.9] Revert \"Use proper method for comparing linear data\"

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

Mentioned in SAL (#wikimedia-operations) [2021-11-19T01:35:05Z] <jhuneidi@deploy1002> Synchronized php-1.38.0-wmf.9/extensions/Cite/modules/ve-cite/ve.dm.MWReferenceNode.js: Backport for T296044 (duration: 00m 55s)

matmarex edited projects, added Editing QA; removed Patch-For-Review.

Should be fixed on all Wikimedia wikis now. Sorry about that.

hashar assigned this task to matmarex.
hashar subscribed.

Looks solved based on a test I have made on testwiki which is running 1.38.0-wmf.9 ( https://test.wikipedia.org/w/index.php?title=T296044&diff=490932&oldid=490931 ).

Thank you @matmarex!

This can be verified after the clarification of testing requirements from @matmarex.