Page MenuHomePhabricator

action=visualeditor&paction=parsedoc or paction=parsefragment fails with a typeerror
Closed, ResolvedPublicPRODUCTION ERROR

Description

Steps to reproduce:
Make an api call with action=visualeditor&paction=parsedoc for any page:

https://simple.wikipedia.org/w/api.php?action=visualeditor&paction=parsedoc&page=Wikipedia:Sandbox resulted in:

{
    "error": {
        "code": "internal_api_error_TypeError",
        "info": "[8951fed5-732f-4380-9b31-e5d5a3886ca2] Caught exception of type TypeError",
        "errorclass": "TypeError"
    },
    "servedby": "mw1396"
}

https://en.wikipedia.org/w/api.php?action=visualeditor&paction=parsedoc&page=Wikipedia:Teahouse resulted in:

{
    "error": {
        "code": "internal_api_error_TypeError",
        "info": "[a5805455-8fbf-4944-8c43-4ec817155eca] Caught exception of type TypeError",
        "errorclass": "TypeError"
    },
    "servedby": "mw1283"
}

There are also errors for using paction=parsefragment for the same pages

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 changed the subtype of this task from "Task" to "Production Error".
DannyS712 renamed this task from action=visualeditor&paction=parsedoc fails with a typeerror to action=visualeditor&paction=parsedoc or paction=parsefragment fails with a typeerror.Apr 13 2021, 8:06 PM
DannyS712 updated the task description. (Show Details)

You're supposed to provide the 'wikitext' parameter in these requests (but they should definitely return a nice error).

Change 679360 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] api: Better error when 'wikitext' parameter is required

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

Change 679360 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] api: Better error when 'wikitext' parameter is required

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