Page MenuHomePhabricator

Cannot save VisualEditor content in File namespace
Open, MediumPublicBUG REPORT

Description

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

  • Open a page in the File namespace with VisualEditor
  • Edit it
  • Either click on "edit source" or try to save the page

What happens?:

A popup appears with "Unable to fetch Parsoid HTML: No downgrade possible from schema version 0.0.0 to 2.8.0.". Edits cannot be saved.

What should have happened instead?:

No popup, edit saved.

Other information (browser name/version, screenshots, etc.):

Bug seen on both Commons and Officewiki.

Event Timeline

Most probably another version of https://phabricator.wikimedia.org/T365036, which should be fixed in the next train.

Well, it turns out it didn't get fixed in the train.
Still visible on commons and officewiki; however, testwiki does not seem to be impacted.
I looked into logs and couldn't find anything relevant.
I'm puzzled.

MSantos triaged this task as Medium priority.May 23 2024, 2:19 PM
MSantos added a project: Essential-Work.
MSantos moved this task from Needs Triage to Bugs & Crashers on the Parsoid board.

Strong hypothesis: this happens when CommonsMetadata is involved in the rendering of the page.
Specifically, the DataCollector::verifyAttributionMetadata runs getText, which on VE content is considered Parsoid content, which converts back and forth between content and PageBundle, which loses the version number during that operation.

This is probably also a main path for T365036.

What's bugging me slightly is that I do not understand why it doesn't seem to trigger on https://test.wikipedia.org/wiki/File:USMC-100303-M-7753H-097-2.jpg, because it feels like it should.

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

[mediawiki/core@master] Fix bundle reinjection of ContentDOMTransformStage

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

cscott subscribed.

Strong hypothesis: this happens when CommonsMetadata is involved in the rendering of the page.
Specifically, the DataCollector::verifyAttributionMetadata runs getText, which on VE content is considered Parsoid content, which converts back and forth between content and PageBundle, which loses the version number during that operation.

This is probably also a main path for T365036.

Filed this as T366395: CommonsMetadata DataCollector::verifyAttributeMetadata should use ParserOutput::getRawText().

Change #1041280 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/services/parsoid@master] Use JsonCodec to serialize data-parsoid/data-mw; ensure PageBundle is arrays

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

Change #1041280 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Use JsonCodec to serialize data-parsoid/data-mw; ensure PageBundle is arrays

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

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

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a9

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

Change #1048480 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.20.0-a10

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

This bug can still be reproduced, did you fix it?

i am here because same thing happened to me today.

image.png (539×1 px, 65 KB)

We had a bit of a hiccup on the merge of this patch (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1037576); I'll make sure it rides this week's train - should be fixed on all wikis by the end of the week. Thanks for raising this!

Change #1037576 merged by jenkins-bot:

[mediawiki/core@master] Fix bundle reinjection of ContentDOMTransformStage

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