Page MenuHomePhabricator

Unexpected wikitext changes & whitespace removals by VisualEditor edits
Open, HighPublicBUG REPORT

Description

see https://de.wikipedia.org/w/index.php?title=Salpingoeca&diff=prev&oldid=261885884

The only Visual Editor change we have done here was a typo correction: kkennt → kennt (deleted one letter only)

After saving the change we got a diff, that deleted many other characters in the wikitext, and this must not have happened.

This bug is reproduceable by different users with same result.

Steps for the wikilink underscore example to reproduce:

  • Open a page for visual editing
  • Insert a Cite ref
  • Give the ref the body [[a b]].
  • Review changes as wikitext

The link will show as [[a_b]], it should have remained [[a b]].

Event Timeline

https://de.wikipedia.org/w/index.php?diff=261940052

a further unexpected automatic change has happened here: after saving there have been underscores now in one of the wikilinks in the wikitext: [[Bundeszentrale für Politische Bildung]] → [[Bundeszentrale_für_Politische_Bildung]]

thiemowmde triaged this task as Unbreak Now! priority.Nov 28 2025, 12:51 PM

I was able to reproduce the underscore bug locally. When I do any edit the content of my example reference gets re-serialized as <ref>[[a_b]]</ref> in wikitext, with underscores instead of spaces. I can confirm it is caused by https://gerrit.wikimedia.org/r/1208418 and the linked Parsoid patch https://gerrit.wikimedia.org/r/1208139. Temporarily marking as "unbreak now" for the Content-Transform-Team to have a look.

thiemowmde renamed this task from unexpected wikitext deletions by Visual Editor edits to Unexpected wikitext changes & whitespace removals by VisualEditor edits.Nov 28 2025, 12:54 PM
thiemowmde added subscribers: awight, WMDE-Fisch.

The original change in this set was DataMwAttrib: Use live DocumentFragment for html values, which uncovered various issues with serialization of attribute-embedded data-parsoid requiring follow ups. Mentioning this in case it is relevant to the investigation.

Change #1212798 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] [WIP] Fix regression

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

Change #1212798 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Fix dirty-diffs in ref content

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

Change #1213536 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a8

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

Change #1213536 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a8

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

@cscott , @ssastry , @Arlolra Thanks for whipping up code to fix this! Now, if I remember correctly, for Parsoid changes to take effect on Wikimedia wikis, Stashbot needs to be run? What I mean to say is: I don't think this can wait until Thursday evening.

Change #1214045 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@master] Bump wikimedia/parsoid to 0.23.0-a7.1

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

Change #1214047 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a7.1

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

Change #1214045 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/core@master] Bump wikimedia/parsoid to 0.23.0-a7.1

Reason:

i don't want to do that, actually

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

Change #1214047 abandoned by Isabelle Hurbain-Palatin:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.23.0-a7.1

Reason:

i don't want to do that, actually

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

Change #1214069 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/vendor@wmf/1.46.0-wmf.4] Bump parsoid to v0.23.0-a7.1 on wmf.4

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

Change #1214070 had a related patch set uploaded (by Isabelle Hurbain-Palatin; author: Isabelle Hurbain-Palatin):

[mediawiki/core@wmf/1.46.0-wmf.4] Bump parsoid to v0.23.0-a7.1 on wmf.4

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

Change #1214069 merged by jenkins-bot:

[mediawiki/vendor@wmf/1.46.0-wmf.4] Bump parsoid to v0.23.0-a7.1 on wmf.4

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

Change #1214070 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.4] Bump parsoid to v0.23.0-a7.1 on wmf.4

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

Mentioned in SAL (#wikimedia-operations) [2025-12-02T16:35:25Z] <ihurbain@deploy2002> Started scap sync-world: Backport for [[gerrit:1214069|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]], [[gerrit:1214070|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]]

Mentioned in SAL (#wikimedia-operations) [2025-12-02T16:37:32Z] <ihurbain@deploy2002> ihurbain: Backport for [[gerrit:1214069|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]], [[gerrit:1214070|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-12-02T16:44:46Z] <ihurbain@deploy2002> Finished scap sync-world: Backport for [[gerrit:1214069|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]], [[gerrit:1214070|Bump parsoid to v0.23.0-a7.1 on wmf.4 (T411238 T410960)]] (duration: 09m 21s)

@Nirmos we backported that patch to wmf.4, so the fix should be available on all wikis as of a few minutes ago.

Thank you so much for your work on this, @ihurbain ! I do believe backporting this was the right call.

Re: Tech News - What wording would you suggest as the content, and When should it be included? Thanks!

I don't think this is worth a Tech News entry. Others might disagree (perhaps @doctaxon who added the user-notice tag?) but I would still consider this a "limited-scale incident" -> https://meta.wikimedia.org/wiki/Tech/News/For_contributors#What_is_typically_not_included

@Johannnes89 : I think it's worth a Tech News because many contributors using Visual Editor have run into this error, and it was not only dewiki. But I am not that professional in technical things to create a proper wording.

@STei-WMF : Tech News wording suggested: "A regression bug in Parsoid caused VisualEditor to make unintended changes to wikitext, including removing whitespace and replacing spaces with underscores in wikilinks inside citations. The bug was introduced on November 28 and affected multiple wikis. A fix was deployed to all Wikimedia wikis on December 2, 2025. Editors who used VisualEditor between these dates should review their recent edits for unexpected modifications."

MSantos lowered the priority of this task from Unbreak Now! to High.Dec 4 2025, 3:25 PM
MSantos subscribed.

Changing the priority to reflect reality even though we are still verifying it.

I wonder if this is truly fixed. VE is till making changes like this. Is there perhaps a different task for that?

VE is also seemingly replacing Image with File. Should I open a new task for these issues?