MediaWiki VisualEditor Parsoid on Windows Server 2012

The steps to get Parsoid working on Windows are here.

The MediaWiki project has been working on a visual text editor. It’s the default editor for the main namespace at mediawiki.org, and is in an early trial at Wikipedia.org. They’ve done a great job, I really like it. It also has some serious challenges to overcome, as outlined in a blog post by project lead Gabriel Wicke. Their solution is a project called parsoid which stands between the VisualEditor and the Wikitext which powers the project.

Parsoid is a nodeJS project. I needed to get it running on a Windows server, and I figured it would be pretty easy (node runs on Windows). I followed the instructions and quickly ran up against some red errors. The discussion page for the project had numerous complaints about it not working on Windows, and Google was no help. I installed it on a Linux box and grepped the entire tree for “windows”, and lo, the last result revealed unto me the truth:

### Windows

* A recent copy of the *x86* version of [Node.js for Windows](http://nodejs.org/download/), *not* the x64 version.
* A copy of [Visual C++ 2010 Express](http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express).
* A copy of [Python 2.7](http://www.python.org/download/), installed in the default location of `C:\Python27`.

So that was it, with the dependencies satisfied Postoid installed correctly and ran normally. It turns out that Posoid has a deeply nested dependency on a module called “contextify” (parsoid ā†’ html5 ā†’ jsdom ā†’ contextify). Contextify has to compile something (honestly I have no idea what) and is expecting Python and a C compiler. These are standard tools on a Linux system, but not on Windows.

Advertisements

About robertlabrie
DevOps Engineer at The Network Inc in metro Atlanta. Too many interests to list here, check out my posts, or look me up on LinkedIn

7 Responses to MediaWiki VisualEditor Parsoid on Windows Server 2012

  1. Philip says:

    Any luck getting VisualEditor and Parsoid setup with MediaWiki running on IIS? We’re running into authentication issues.

    • robertlabrie says:

      Hi Phillip,

      Parsoid doesn’t support HTTP authentication. I got it to work, but I had to manually find all the references to the request object and add the username and password. NodeJS request class doesn’t take username and password in the url (ie http://user:pass@host:port). If you go to the Parsoid talk page at MediaWiki.org and second my request for supporting this, maybe they’ll get to it šŸ™‚

  2. Brandon says:

    Jason,

    Did you have any luck in implementing the changes needed for Parsoid to play nicely with HTTP Authentication? I’d love to get VisualEditor working on my Intranet deployment of MediaWiki on IIS using Auth_remoteuser! Parsoid is running properly, but the authentication fails.

  3. sean says:

    This is not so:

    “The steps to get Parsoid working on Windows are here.”

    https://www.mediawiki.org/w/index.php?title=Parsoid/Setup

    Instructions seem to be for *nix only.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: