[MediaWiki-l] VirtualEditor: Error loading data from server: 404: parsoidserver-http: HTTP 404

Herta Van den Eynde herta.vandeneynde at gmail.com
Fri Feb 26 17:32:26 UTC 2016


Environment:

OS: Ubuntu 14.04.4 LTS
MediaWiki: 1.26.2
wiki url: http://intranet.hit.local/wiki-hitit/
parsoid listener port: 8142


After a good day of trying to set up VirtualEditor, the above error is
still with us.

I think I followed the instructions in
- https://www.mediawiki.org/wiki/Extension:VisualEditor
- https://www.mediawiki.org/wiki/Parsoid/Setup

though, I'm still uncertain about the url.

/var/www/html/wiki-hitit/LocalSettings.php has the following entries for
VisualEditor:

    ### VisualEditor
    require_once( "$IP/extensions/VisualEditor/VisualEditor.php" );
    $wgDefaultUserOptions['visualeditor-enable'] = 1;
    $wgSessionsInObjectCache = true;
    $wgVirtualRestConfig['modules']['parsoid'] = array(
      'url' => 'http://localhost:8142/wiki-hitit/',
      'prefix' => 'wiki-hitit'
    );

/etc/mediawiki/parsoid/localsettings.js has the following entries:

    'use strict';
    exports.setup = function(parsoidConfig) {
        parsoidConfig.setMwApi({ prefix: 'wiki-hitit', uri: '
http://localhost/wiki-hitit/api.php' });
        parsoidConfig.useSelser = true;

    };

/var/www/html/wiki-hitit/extensions/parsoid/localsettings.js has these:

    'use strict';

    exports.setup = function(parsoidConfig) {
        parsoidConfig.setMwApi({
                prefix: 'wiki-hitit', // optional
                uri: 'http://localhost/wiki-hitit/api.php'
        });
        parsoidConfig.useSelser = true;
    };

The api.php is accessible:

    $ curl 'http://localhost/wiki-hitit/api.php' | head
      % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                     Dload  Upload   Total   Spent    Left
 Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:--
--:--:--     0
    <!DOCTYPE html>
    <html lang="en" dir="ltr" class="client-nojs">
    <head>
    <meta charset="UTF-8" />
    <title>MediaWiki API help - Hitit</title>

The wiki pages now have both an 'edit' and an 'edit source' tab.  But when
you press the 'edit' tab, you get a pop-up with this error message:
  "Error loading data from server: 404: parsoidserver-http: HTTP 404. Would
you like to retry?"

I've found several articles about this issue, but none that helped.

Is the url/uri definition correct? (All examples I found used simple urls.)

Are there any log files I can check?  I tried the parsoid and apache2 logs,
but there's nothing there.

Any other suggestions?

Kind regards,

Herta


More information about the MediaWiki-l mailing list