VisualEditor: Edits triggering CAPTCHA cannot be saved
Closed, ResolvedPublic

Description

On a CAPTCHA-triggering edit, VE does not display the CAPTCHA, instead showing an alert:

Error saving data to server: Failed request: error.

Marking critical, because VE is in use by 50% of new users at enwiki, none of whom are now able to add external links for sourcing purposes.


Version: unspecified
Severity: critical

Details

Reference
bz50356
TTO created this task.Jun 28 2013, 10:01 AM
TTO added a comment.Jun 28 2013, 12:32 PM

(In reply to comment #0)

Error saving data to server: Failed request: error.

The same error is also seen when triggering the spam blacklist.

This depends on MediaWiki making the CAPTCHAs available through an API, which I believe is currently not done. Timo to comment.

Right now the handling of any error results the following alert:

Error saving data to server: Failed request: {api.result}.

The only variable we use is the result code, not the error code. And though the error code varies (badtoken, hookabort, needcaptcha) the result is always "error".

Fortunately (at least) the ConfirmEdit extension, and specifically the FancyCaptcha variant (which Wikimedia uses) does provide an API and exposes the following through the EditPage/ApiEdit/ApiVisualEditor result:

{

"visualeditor": {
    "result": "error",
    "edit": {
        "captcha": {
            "type": "image",
            "mime": "image/png",
            "id": "626590462",
            "url": "//alpha.wikipedia.krinkle.dev/w/index.php?title=Special:Captcha/image&wpCaptchaId=fa4e388ad7"
        },
        "result": "Failure"
    }
}

}

So it looks like we can use this to build the UI for it.

Change 71160 had a related patch set uploaded by Krinkle:
mw: Implement support for ConfirmEdit and FancyCaptcha

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

Change 71160 merged by jenkins-bot:
mw: Implement support for ConfirmEdit and FancyCaptcha

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

This is now fixed in master and will be deployed on Monday.

[[mw:Thread:Extension talk:VisualEditor/VE and ConfirmEdit]]

Add Comment