Page MenuHomePhabricator

When wiki is read-only (wgReadOnly), mobile editor doesn't know what to do
Closed, ResolvedPublic

Description

Right now, if you try to edit an article on mobile while the database is in read-only mode, it gives you the error message "Error, can't load section." and leaves the spinner spinning forever.

Ideally, the mobile editor should detect the 'readonly' error code, close the editing overlay, and give an appropriate error message. Here is a sample API response from when the database is locked:
{"servedby":"deployment-apache02","error":{"code":"readonly","info":"The wiki is currently in read-only mode","readonlyreason":"The database has been automatically locked while the slave database servers catch up to the master"}}


Version: unspecified
Severity: normal

Details

Reference
bz67514

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:33 AM
bzimport set Reference to bz67514.
bzimport added a subscriber: Unknown Object (MLST).
kaldari created this task.Jul 4 2014, 12:58 AM

Hmm, i have tested it, but i can go through the edit workflow (get the section loaded into editor and get the preview too). If i try to save, i get the error, that the edit can't be saved (correctly, the db is locked). Did i anything wrong?

actual master version
Used stable
Try to edit first section of existing (non-protected) article

(Or do you mean the error message after try to save?)

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Trello card https://trello.com/c/ija1pbwE

Since this only happens when database is locked I don't think this is so pressing.

Sounds like we just need to improve error handling when that error kicks it and should be easy to fix with a unit test.

Change 164407 had a related patch set uploaded by Bmansurov:
Show the correct error message when saving in EditorOverlay when the database is in readonly mode.

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

Change 164407 merged by jenkins-bot:
Indicate read-only error in EditorOverlay

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