so I explain my problem.
I have a MediaWiki instance in version 1.38 that works perfectly locally. This instance is running with docker-compose. Here is my YAML file:
version: '3.7'
services:
mediawiki:
image: myImageMediawiki:1.38.2
restart: always
ports:
- 8090:80
links:
- database
- memcached
volumes:
- /home/path/mediawiki/volumes/extensions/PluggableAuth:/var/www/html/extensions/PluggableAuth
- /home/path/mediawiki/volumes/extensions/LDAPAuthentication2:/var/www/html/extensions/LDAPAuthentication2
- /home/path/mediawiki/volumes/extensions/LDAPProvider:/var/www/html/extensions/LDAPProvider
- /home/path/mediawiki/volumes/extensions/LDAPAuthorization:/var/www/html/extensions/LDAPAuthorization
- /home/path/mediawiki/volumes/extensions/Babel:/var/www/html/extensions/Babel
- /home/path/mediawiki/volumes/extensions/VisualEditor:/var/www/html/extensions/VisualEditor
- /home/path/mediawiki/volumes/images:/var/www/html/images
- /home/path/mediawiki/volumes/LocalSettings.php:/var/www/html/LocalSettings.php
- /home/path/mediawiki/volumes/ldapprovider.json:/var/www/html/ldapprovider.json
- /home/path/mediawiki/volumes/php.ini:/usr/local/etc/php/php.ini
- /home/path/mediawiki/volumes/logo/logo.png:/var/www/html/resources/assets/logo.png
memcached:
image: memcached:1.6-alpine
restart: always
database:
image: mariadb:10.5
restart: always
volumes:
- /home/path/mediawiki/volumes/db:/var/lib/mysql
- /home/path/mediawiki/volumes/initdb:/docker-entrypoint-initdb.d
environment:
MYSQL_DATABASE: myDB
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
All my containers run perfectly without any particular errors.
I want to install the VisualEditor plugin in version 1.38. To do this I downloaded the plugin from the official website and I followed the installation tutorial of the official MediaWiki website. I add my extension in the extension folder (as for the other extensions) and add the following lines to my LocalSettings.php file:
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
$wgGroupPermissions['user']['writeapi'] = true;
Once the plugin is installed I do have the VisualEditor button present. However, as soon as I click on the "Modify" button I get this error:
I also looked at the API side. This one is well accessible with the link http://localhost:8091/api.php
But when I look at the call to the endpoint function for editing the page with VisualEditor I have this call:
And I get this response:
{
"error": {
"code": "apierror-visualeditor-docserver-http-error",
"info": "Error contacting the Parsoid/RESTBase server: (curl error: 7) Couldn't connect to server",
"docref": "See http://localhost:8091/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
}
}
If more information is needed don't hesitate to ask me.