Page MenuHomePhabricator

Page is blank when edited a page on gomwiktionary with VisualEditor (new pages are missing on some RESTBase servers)
Open, MediumPublic

Description

When one tries to edit a page on gomwiktionary with VisualEditor, the page is still blank. Sometimes, the second time one loads VE, the contents appear in the editor. Perhaps it will take some time for the performance to improve?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 4 2020, 7:04 PM

I could only reproduce this once in Firefox 77 e.g. by going to https://gom.wiktionary.org/w/index.php?title=विक्शनरी:Tintto&veaction=edit but not a second time.

Urbanecm added a subscriber: Urbanecm.

That's interesting. I doubt this is related to VisualEditor itself, but to the fact the REST API sometimes throws 404. See my test attempts through curl:

urbanecm@titanium  ~
$ for i in {0..10}; do curl -I 'https://gom.wiktionary.org/api/rest_v1/page/html/%E0%A4%B5%E0%A4%BE%E0%A4%AA%E0%A4%B0%E0%A4%AA%E0%A5%80%3AMartin_Urbanec%2Fsand/17967?redirect=false&stash=true' 2> /dev/null | gre
p HTTP; done
HTTP/2 200
HTTP/2 200
HTTP/2 200
HTTP/2 404
HTTP/2 200
HTTP/2 404
HTTP/2 404
HTTP/2 404
HTTP/2 200
HTTP/2 404
HTTP/2 404
urbanecm@titanium  ~
$

I tried to modify that command to find out which servers return the incorrect results:

curl -s -I "https://gom.wiktionary.org/api/rest_v1/page/html/%E0%A4%B5%E0%A4%BE%E0%A4%AA%E0%A4%B0%E0%A4%AA%E0%A5%80%3AMartin_Urbanec%2Fsand/17967?redirect=false&stash=true" | grep -P "HTTP|server:"

I ran that 100 times.

  • Received HTTP 200s from: restbase1016, restbase1017, restbase1020, restbase1021, restbase1022, restbase1024, restbase1025, restbase1026, 404: restbase1018
  • Received HTTP 404s from: restbase1019, restbase1023, restbase1027

VisualEditor should be able to detect this situation though, and display an error message, instead of believing RESTBase when it says the page doesn't exist. We have checks in place for when the page already exists but RESTBase returns an older revision than MediaWiki (to avoid data loss by accidentally overwriting newer changes), it seems to me that this should also work when RESTBase returns nothing but MediaWiki returns a revision. Not sure why it doesn't.

matmarex renamed this task from Page is blank when edited a page on gomwiktionary with VisualEditor to Page is blank when edited a page on gomwiktionary with VisualEditor (new pages are missing on some RESTBase servers).Jul 5 2020, 5:31 PM
Nintendofan885 added a comment.EditedJul 5 2020, 5:41 PM

Pinging @The_Discoverer as they were the one who originally reported this in T253226#6279178

Change 609585 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Also check for revid conflict when RESTBase says page doesn't exist

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

JTannerWMF moved this task from To Triage to Triaged on the VisualEditor board.
JTannerWMF added a subscriber: JTannerWMF.

Do you have ownership of Restbase Platform Engineering ? There isn't anything left for the Editing team to do here.

@JTannerWMF , we are trying to triage this and it is unclear what is needed. Review on the patch, or does something need to be done to RESTBase?

No, the patch doesn't fix the issue, it only makes VE display a message when this issue occurs (and we'll review it).

The RESTBase problem is that URLs like https://gom.wiktionary.org/api/rest_v1/page/html/%E0%A4%B5%E0%A4%BE%E0%A4%AA%E0%A4%B0%E0%A4%AA%E0%A5%80%3AMartin_Urbanec%2Fsand/17967?redirect=false&stash=true sometimes return a HTTP 404 instead of the expected content.

(Or at least, that was the case a week ago T257124#6279748, I can't reproduce that when trying now… I think we'd still appreciate you having a look to find out what fixed it and to avoid it happening again in the future)

AMooney triaged this task as Medium priority.Tue, Jul 21, 8:48 PM
AMooney moved this task from Inbox to Next on the Platform Team Workboards (Clinic Duty Team) board.

Change 609585 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Also check for revid conflict when RESTBase says page doesn't exist

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

(That patch only improves the error message in VE – I'm still curious to hear what you did to fix the actual error, or why it fixed itself.)