We got the following configuration to work
Component | Version |
---|---|
MediaWiki | 1.32.2 |
Parsoid | 0.10.0 |
VisualEditor | 0.1.0 (e82e120) 23:48, 18. Mär. 2019 |
PHP | 7.3.6 |
This is the activation of VE in LocalSettings.php
# ----------------------------------------------------------------------
# VisualEditor
# ----------------------------------------------------------------------
wfLoadExtension( 'VisualEditor' );
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-editor'] = 'visualeditor';
$wgHiddenPrefs[] = 'visualeditor-enable';
$wgVirtualRestConfig['modules']['parsoid'] = array(
'url' => 'http://localhost:8142',
'domain' => 'mediawikitest');
// this workaround is needed for the functioning of VE - unclear why
function workaround_for_ve() {
global $wgUser;
$wgUser->getID();
return true;
}
$wgHooks['SpecialPage_initList'][]='workaround_for_ve';
The corresponding entry in /etc/mediawiki/parsoid/config.yaml is
services:
- module: ../src/lib/index.js
entrypoint: apiServiceWorker
conf:
# Configure Parsoid to point to your MediaWiki instances.
mwApis:
- # Editorsettings for mediawikitest
uri: 'http://localhost/mediawikitest/api.php'
domain: 'mediawikitest'
Before adding this workaround our wiki had the following behaviour: Upon clicking the 'edit' tab the loading bar of VE shortly flashed up, disappeared and left the browser address '..mediawikitest/index.php/mainpage?veaction=edit'
The strange thing is the workaround we needed, and we would like to know if someone has an explanation, why this workaround works, and whether there is a direct solution for achieving the same result. MW Kappa (talk) 16:32, 22 July 2019 (UTC)