Setting up Visual Editor for a private wiki, but keep getting errors as stated in the topic, when I hit edit on pages. How can I fix this problem?
Settings in Localhost.php
# Disable reading by anonymous users
$wgGroupPermissions['*']['read'] = false;
# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;
# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;
# Linking with Parsoid
$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance
// Use port 8142 if you use the Debian package
'url' => 'server's ip address:8000',
// Parsoid "domain", see below (optional)
'domain' => 'localhost',
// Parsoid "prefix", see below (optional)
'prefix' => 'localhost'
);
# Basic configuration for MediaWiki-VisualEditor
wfLoadExtension( 'VisualEditor' );
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
Settings in config.yaml
services:
- module: lib/index.js
entrypoint: apiServiceWorker
conf:
# For backwards compatibility, and to continue to support non-static
# configs for the time being, optionally provide a path to a
# localsettings.js file. See localsettings.example.js
#localsettings: ./localsettings.js
# Set your own user-agent string
# Otherwise, defaults to:
# 'Parsoid/<current-version-defined-in-package.json>'
#userAgent: 'My-User-Agent-String'
# Configure Parsoid to point to your MediaWiki instances.
mwApis:
- # This is the only required parameter,
# the URL of you MediaWiki API endpoint.
uri: 'server's IP address/wiki/api.php'
# The "domain" is used for communication with Visual Editor
# and RESTBase. It defaults to the hostname portion of
# the `uri` property above, but you can manually set it
# to an arbitrary string. It must match the "domain" set
# in $wgVirtualRestConfig.
domain: 'localhost' # optional
# To specify a proxy (or proxy headers) specific to this prefix
# (which overrides defaultAPIProxyURI). Alternatively, set `proxy`
# to `null` to override and force no proxying when a default proxy
# has been set.