Page MenuHomePhabricator

VisualEditor can't save pages on de.wikipedia.beta
Closed, ResolvedPublicPRODUCTION ERROR

Description

As reported by @matmarex at T320531#8313224

The change on beta de.wp (T320531) seems to have broken saving changes to existing pages using visual editor. (Opening the editor doesn't fail, only saving/reviewing; and saving new pages also works.)

Testing on https://de.wikipedia.beta.wmflabs.org/wiki/Benutzer:Yatu, I get an error message mentioning HTTP 412 (Precondition Failed).

image.png (962×3 px, 254 KB)

This happens because when opening VE, it loads the existing page HTML client-side (the request is sent from the JS code in the user's browser, not from the PHP code) from https://de.wikipedia.beta.wmflabs.org/api/rest_v1/page/html/Benutzer%3AYatu?redirect=false&stash=true, which presumably still points to RESTBase. But when saving, it calls the core MediaWiki/Parsoid code, which doesn't have the original stashed HTML, so it fails.

Impact

VE edits fail on de.wikipedia.beta. Once the relevant change goes out with the train, it would make VE edits fail on wikitech, since wikitech also uses VE in "direct" mode. [Will only affect wikis that have $wgVisualEditorRestbaseURL or $wgVisualEditorFullRestbaseURL set].

Notes

Caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/827005. We may need to revert.
The relevant config change for beta (T320531) should be kept, so we can observe whether this is still broken.

Related Objects

StatusSubtypeAssignedTask
StalledNone
In ProgressNone
OpenNone
OpenNone
ResolvedJgiannelos
Resolveddaniel
ResolvedClement_Goubert
OpenNone
Resolvedhnowlan
In ProgressNone
Resolveddaniel
ResolvedNone
ResolvedPRODUCTION ERRORdaniel
Resolveddaniel
OpenMSantos
OpenNone
OpenNone
ResolvedROdonnell-WMF
OpenBUG REPORTNone
OpenBUG REPORTNone
OpenBUG REPORTNone
OpenBUG REPORTNone
OpenNone
Resolveddaniel
OpenNone
OpenNone

Event Timeline

Change 842365 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/extensions/VisualEditor@master] Don't try to contact RESTbase directly when in PHP direct mode.

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

Change 842365 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Don't try to contact RESTbase directly when in PHP direct mode.

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

Change 842858 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] Beta: set $wmgVisualEditorAccessRestbaseDirectly = false for dewiki.

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

Change 842858 merged by jenkins-bot:

[operations/mediawiki-config@master] Beta: set $wmgVisualEditorAccessRestbaseDirectly = false for dewiki.

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