Hello! I have the latest version of MediaWiki, and when I try to edit or save a page it gives me this:
"Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server"
I've looked online and there has been no fix that has worked for me so far. (no one has asked about this on Phabricator yet)
I use macOS and XAMPP.
If anyone could help, that would be great!
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T266971 "Error contacting the Parsoid/RESTBase server" (HTTP 404/403) and similar errors (catalog) | |||
Resolved | None | T279203 Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server |
Event Timeline
no one has asked about this on Phabricator yet
Yes they have. See T263928: VisualEditor in 1.35 not working (404 / Permanent Loading) and T261581: Request to parsoid failed on Docker Developer Environment at 80 port which have the identical error message mentioned within them.
I have the latest version of MediaWiki
Latest version is ambiguous.
There are many threads on the support desks, such as https://www.mediawiki.org/wiki/Topic:Tjzkjkhe1voerymw / https://www.mediawiki.org/wiki/Topic:Uzwaxv6t2myhvf8o / https://www.mediawiki.org/wiki/Topic:Tlh4ayg0ycrrkzas / https://www.mediawiki.org/wiki/Topic:Toakcj2gz91ty119
You should probably add port mapping info in troubleshooting: https://www.mediawiki.org/wiki/Extension:VisualEditor#Troubleshooting
I guess it is more common now to either have a proxy or a docker container port mapping.
This is a minimum, required configuration for MW 1.35 for VE in practice:
wfLoadExtension( 'Parsoid', 'vendor/wikimedia/parsoid/extension.json' ); $wgVirtualRestConfig['modules']['parsoid'] = array( // local, server-server URL; must be valid within your VM/container 'url' => "http://localhost/rest.php", );
Contrary to what docs says you seem to need both. And I think this should be safe for almost all installations.
I think it is crucial to not that the URL is not the same as you see in your browser. It is an url for server-server communication (not user-server).
One reason the port is different is that you are running a docker image with port mapping like -p 8080:80. The other would be that you have a HTTPS proxy and so remotely you have a 443 and internally you have a port 80.
Example docker-compose.yml you can use to repeat the problem:
mediawiki: image: 'mediawiki:lts' ports: - '8000:80'
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.