4

I'm trying to get the MediaWiki visual editor extension working on a shared host.

I have completed the installation as per the instructions given (here). When trying to access the heroku app, I had got an application error. As per discussion here I edited the config.yaml file, and following this the parsoid test performed as expected.

I got back to the Mediawiki site and completed the remaining steps. Then on clicking edit, I got a 404 error. As per the suggestion here, I changed the uri parameters in the two parsoid files (localsettings.js and config.yaml) from the pattern http://mediawikisitename.com/api.php to http://mediawikisitename.com.

Following the above change the toolbar and the greyed editing area with the progress bar is being displayed. The progress bar hangs after about 60%-100% and then gives a http 0 error.

Any help in troubleshooting this error is welcome!

The localsettings.js is as follows

/*
 * This old / unusual way to configure Parsoid.
 *
 * You'll probably want to start in config.example.yaml
 * and only end up here if you need some sort of backwards compatibility
 * or to support non-static configuration.
 */
'use strict';

 exports.setup = function(parsoidConfig) {
   // Do something dynamic with `parsoidConfig` like,
 parsoidConfig.setMwApi({
    uri: 'mysite',
});
};

The config.yaml is as follows.

# This is a sample configuration file
# Copy this file to config.yaml and edit that file to fit your needs.
# Also see:
# - `npm start -- -h` for more information about passing config files via
#   the commandline.
# - lib/config/ParsoidConfig.js for all the properties that you can configure
#   here. Not all properties are documented here.

worker_heartbeat_timeout: 300000
logging:
level: info
#metrics:
#    type: log

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: 'mysite'

# The "domain" is used for communication with Visual Editor
# and RESTBase.  It defaults to the hostname portion of
# the `uri` property below, but you can manually set it
# to an arbitrary string.
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.
#proxy:
#    uri: 'http://my.proxy:1234/'
#    headers:  # optional
#        'X-Forwarded-Proto': 'https'
# We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly
# for other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
# 'enwikivoyage' etc.
# The default for this is false. Uncomment the line below if you want
# to load WMF's config for wikipedias, etc.
#loadWMF: true
# A default proxy to connect to the API endpoints.
# Default: undefined (no proxying).
# Overridden by per-wiki proxy config in setMwApi.
#defaultAPIProxyURI: 'http://proxy.example.org:8080'
# Enable debug mode (prints extra debugging messages)
#debug: true
# Use the PHP preprocessor to expand templates via the MW API (default true)
#usePHPPreProcessor: false
# Use selective serialization (default false)
#useSelser: true
# Allow cross-domain requests to the API (default '*')
# Sets Access-Control-Allow-Origin header
# disable:
#allowCORS: false
# restrict:
#allowCORS: 'some.domain.org'
# Allow override of port/interface:
#serverPort: 8000
#serverInterface: '127.0.0.1'
# The URL of your LintBridge API endpoint
#linterAPI: 'http://lintbridge.wmflabs.org/add'
# Require SSL certificates to be valid (default true)
# Set to false when using self-signed SSL certificates
#strictSSL: false
# Use a different server for CSS style modules.
# Leaving it undefined (the default) will use the same URI as the MW API,
# changing api.php for load.php.
#modulesLoadURI: 'http://example.org/load.php'

The version of MediaWiki is 1.27.0 and visual editor is VisualEditor 0.1.0 (06ca8ea) 21:22, 6 September 2016

Please not the URI I have given the address of mysite

Manesh
  • 586
  • 3
  • 14
  • 31
  • Please paste the parsoid configuration and the VisualEditor configuration to your question. Please also give the version number of MediaWiki and if you downloaded the correct VisualEditor version (should be the same as the MediaWiki version). – Florian Sep 18 '16 at 11:05
  • What version of parsoid are you using? – nnyby Aug 30 '18 at 15:58

0 Answers0