MediaWiki VisualEditor Parsoid on Windows Server 2012
January 16, 2014 7 Comments
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.
Any luck getting VisualEditor and Parsoid setup with MediaWiki running on IIS? We’re running into authentication issues.
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 š
Hi Robert, what files are you editing to add the username and password manually? I would love for my Parsoid/VisualEditor to work with Auth_remoteuser!
Hi Jason,
Sorry for the long delay. It was an ugly hack. I had to find every instance where “requestOptions” was populated and add an auth object. I don’t work at the company where I did it anymore, and didn’t bring the code with me. Findstr the code for requestOptions. This should help (https://www.npmjs.com/package/request)
Thank you for the reply, I should be able to figure it out!
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.
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.