Page MenuHomePhabricator

Visual Editor doesn't work with sqlite and without curl
Closed, ResolvedPublic

Description

I've installed Media Wiki 1.35.2 from Debian-backports, and I'm using SQLite as database engine. When I edit a page with the Visual Editor, the browser waits for nearly 30 seconds on saving and then reports an error. In the debug log I see the requests for /rest.php misses the header PROMISE-NON-WRITE-API-ACTION: true.

Start request GET /rest.php/ap-1/v3/page/html/SEPA/857?redirect=false&stash=true
IP: fe80::1
HTTP HEADERS:
CONNECTION: close
CONTENT-LENGTH: 0
X-REQUEST-ID: e29da0b8f35d45af55529c76
USER-AGENT: VisualEditor-MediaWiki/1.35.2
HOST: ap-1
CONTENT-TYPE: 
(end headers)

The problem is the missing package php-curl. If it's installed it works, if it's missing it fails.
In MultiHttpClient.php:runMulti() is a switch for w/o curl and runMultiHttp doesn't pass the header (esp. PROMISE-NON-WRITE-API-ACTION: true) to the server.

Event Timeline

matmarex subscribed.

We use that header, but the blame probably falls on MediaWiki core somewhere for failing to pass it.

matmarex added a project: MW-1.41-notes.

This problem should no longer occur on MediaWiki 1.41 and later, as VisualEditor no longer uses HTTP requests internally to contact Parsoid, it just calls the PHP methods directly (see T320529 for related work).

Please try MediaWiki 1.41 and hopefully VisualEditor will now finally just work. If you still encounter some issues, please file a new task.