Page MenuHomePhabricator

VisualEditor: API paction=serialize should say so if Parsoid is unavailable (instead of status "success" with missing content)
Closed, ResolvedPublic

Description

  1. Parsoid not running, VisualEditor enabled on to-be-created page X
  2. Enter a few words
  3. "Review and Save"
  4. Loader keeps spinning indefinitely

Request:

action=visualeditor&paction=serialize&html=%3Cp+data-ve-changed%3D%22%7B%26quot%3Bcontent%26quot%3B%3A7%7D%22%3Edfgdg%3C%2Fp%3E&page=Sandbox%2F1&oldid=0&token=%2B%5C&format=json

Response:

{"visualeditor":{"result":"success","content":false}}

No errors.

Note this bug could also be reported as "Loader keeps spinning forever when creating a new page and trying to review/save it"


Version: unspecified
Severity: normal

Details

Reference
bz47581

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:32 AM
bzimport set Reference to bz47581.

Related URL: https://gerrit.wikimedia.org/r/60613 (Gerrit Change Icdf64a792c13a326f494e051be47f2946928d142)

(In reply to comment #1)

Related URL: https://gerrit.wikimedia.org/r/60613 (Gerrit Change
Icdf64a792c13a326f494e051be47f2946928d142)

This fixed the visible problem described below:

(In reply to comment #0)

as "Loader keeps spinning forever when creating a new page and
trying to review/save it"

The error is now handled by stopping the spinner (as we always do after an aborted load) and display the error.

The error message in my case was "No Wikitext content in response from server" triggered from ve.init.mw.Target.onSerialize's patch where there are no errors and eventually finds this by type-checking the content property.

Lowering priority. Todo tasks:

  • Don't return status "success" if content is missing, but use status "error".
  • Make it not just status "error" but actually trigger a proper API response.error property with a more direct error, namely that the Parsoid server is unavailable.

Related URL: https://gerrit.wikimedia.org/r/63861 (Gerrit Change I6bdd177bc9b5a0af9107cf08d8e46470c6778e12)

Merged into master; will go out with wmf5.