Talk:Parsoid/Archive

Set up in web server?
My wiki is on the webserver running Linux 2.6. I've installed node by following ./configure --prefix=${HOME}/local/ make make install Now, I've downloaded Parsoid and copied into the wiki's extension directory: ${HOME}/public_html/testwiki/testwiki/extension/ And, I did cd Parsoid/js npm install Edit the localsettings.js as parsoidConfig.setInterwiki( 'testwiki', 'http://test.mydomain.com/testwiki/' ); and, run the Parsoid server like this: cd Parsoid/js node api/server.js And when I checked the webpage of http://test.mydomain.com:8000/testwiki, but the browser failed to open the page.

Is there anything I missed? Would someone guide me how to set up properly in a webserver, please? (I don't have root access since it is on the webserver.)

Multiple wikis
Can several Mediawiki installation use the same Parsoid server? --Amir E. Aharoni (talk) 18:35, 13 October 2012 (UTC)


 * Yes. The Parsoid takes a prefix when the requests come in to determine which wiki you're talking about. Jdforrester (WMF) (talk) 22:34, 15 October 2012 (UTC)

VPS needed?
I'm running the VisualEditor on a shared server that doesn't allow background services like Parsoid to run. Is there any option to connect to a server running elsewhere? A group parsoid server perhaps? Or will everyone with a MediaWiki site have to upgrade to a VPN?


 * Yes what? Everyone with a MediaWiki site has to upgrade to a VPS?


 * The "yes" wasn't a reply to that comment (indeed, it was written two months previously - have now added the "unsigned" templates). To answer the question, we're looking at building out support for HTML-only wikis that will let you edit with VisualEditor without being able to run Parsoid. Stay tuned! Jdforrester (WMF) (talk) 00:43, 17 July 2013 (UTC)

Gateway between NodeJS/PHP to provide MediaWiki hooks to handle third-party extensions?
Will it be possible to use the hooks from the code MediaWiki like SematicMediaWiki and processing properties Parsoid through a gateway PHP-NodeJS? Vit1251 (talk) 13:24, 19 March 2013 (UTC)

You plan to upgrade nodejs 0.9 and later?
You plan to upgrade nodejs 0.9 and later? Vit1251 (talk) 13:24, 19 March 2013 (UTC)

How about using the Travis-CI test Parsoid on GitHUB?
How about using the Travis-CI test Parsoid on GitHUB? Vit1251 (talk) 13:24, 19 March 2013 (UTC)

You do not plan to switch completely to GitHUB and hide you repository?
Your repository is hard to see the changes and ask, and the user friendly interface and GitHUB availability issue tracker. Vit1251 (talk) 13:35, 19 March 2013 (UTC)

Running Parsoid on a "private" wiki - AccessDeniedError
I have a private wiki in which the users have to log in to read the contents. I managed to install Parsoid (for the VisualEditor extension), but when I run the API server (node api/server.js), I get the following error message.

AccessDeniedError: Your wiki requires a logged-in account to access the API. Parsoid will not work for this wiki!

If I set $wgGroupPermissions['*']['read'] = true; it runs fine, but then the wiki is no longer private. I understand that mediawiki is designed to be "open", but for what I'm using it for, I need to make it private. Any idea?

Installing on a private wiki
If you wan't to install visual editor onto a private wiki

$local_ip = '127.0.0.1'; if ( $_SERVER['REMOTE_ADDR'] == $local_ip ) { $wgGroupPermissions['*']['read'] = true; $wgGroupPermissions['*']['edit'] = true; }else{ $wgGroupPermissions['*']['read'] = false;
 * 1) Disable reading by anonymous users

$wgWhitelistRead = array ("Special:Userlogin", "MediaWiki:Common.css", "MediaWiki:Common.js", "MediaWiki:Monobook.css", "MediaWiki:Monobook.js", "-");

$wgGroupPermissions['*']['edit'] = false; }
 * 1) Disable anonymous editing

--This code needs to be slightly, working on it.

Windows Server 2008 R2
Anyone knows how to get this running in Windows Server 2008 R2?

How can I config to allow Parsoid support multiple wiki?
One of our programmer stubbornly believe that one Parsoid could only support one wiki. I know he is wrong since Wikipedia and Wikia use this in many many wikis. I just don't know how to config. Does anyone know how to config?

Error to install Parsoid on WAMP for Win-7x64...
Hello ! I'm French, sorry for my poor English... I Try to install Parsoid for MediaWiki on WAMP in Windows 7 x64 from this link: http://www.mediawiki.org/wiki/Parsoid#Getting_started

I launch the instal with: "npm install" into : D:\WEB\WAMP\WWW\Website\MyWiki\Extensions\Parsoid\js\

Then I get this final error at the line 281 of npm-debug.log=> ... 277 http 200 https://registry.npmjs.org/domino/1.0.8 278 silly registry.get cb [ 200, 278 silly registry.get  { vary: 'Accept', 278 silly registry.get    server: 'CouchDB/1.3.0 (Erlang OTP/R15B03)', 278 silly registry.get    etag: '"79B59T2JHOSGNNRDXW55UM8PK"', 278 silly registry.get    date: 'Fri, 14 Jun 2013 06:51:45 GMT', 278 silly registry.get    'content-type': 'application/json', 278 silly registry.get    'content-length': '3147' } ] 279 http 200 https://registry.npmjs.org/pegjs 280 silly registry.get cb [ 200, 280 silly registry.get  { vary: 'Accept', 280 silly registry.get    server: 'CouchDB/1.3.0 (Erlang OTP/R15B03)', 280 silly registry.get    etag: '"B1AA422IDG6T49O2B4HUMSAD2"', 280 silly registry.get    date: 'Fri, 14 Jun 2013 06:51:45 GMT', 280 silly registry.get    'content-type': 'application/json', 280 silly registry.get    'content-length': '19774' } ] 281 http GET https://registry.npmjs.org/events/-/events-0.5.0.tgz 282 error Error: No compatible version found: jshashes@'>=0.0.0- <1.0.0-' 282 error Valid install targets: 282 error ["1.0.2","1.0.3"] 282 error    at installTargetsError (C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:682:10) 282 error    at next (C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:661:17) 282 error    at C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:641:5 282 error    at saved (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7) 282 error    at Object.oncomplete (fs.js:297:15) 283 error If you need help, you may report this log at: 283 error     283 error or email it to: 283 error     284 error System Windows_NT 6.1.7601 285 error command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 286 error cwd D:\WEB\WAMP\WWW\Website\MyWiki\Extensions\Parsoid\js 287 error node -v v0.8.22 288 error npm -v 1.2.14 289 verbose exit [ 1, true ] [EOF]

Maybe that's because "Win7" instead of "Unix" ?? Thanks for any reply, or advise to install this Parsoid...

Godvicien (talk) 07:36, 14 June 2013 (UTC)

Grrrr Debian assumptions
It's bad enough that only Debian based Linux distros have "apt" command, and the installation instructions are flawed for all other Linux users, but it also totally ignores Windows/Apache Windows/IIS users.

So can we even use VisualEditor and Parsoid??? If not, then this REALLY needs to be made clear upfront. As I just wasted hours updating a server to use this, only to fall at this hurdle.


 * We've had reports of users installing it on Windows machines, but not sure if they were using local POSIX emulation/compatibility. Sorry for the confusion. Jdforrester (WMF) (talk) 15:55, 5 July 2013 (UTC)

Error downloading node
I'm having difficulty downloading the correct node version as per the instructions. When I try to get the legacy version, I get:

apt-get install nodejs nodejs-legacy npm E: Unable to locate package nodejs-legacy

And so I install the Chris Lea repository version, but then on install:

npm ERR! Not compatible with your version of node/npm: request@2.22.0 npm ERR! Required: ["node >= 0.8.0"] npm ERR! Actual:  {"npm":"1.1.4","node":"0.6.12"}

apt-get install nodejs npm nodejs is already the newest version. npm is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

Any help would be much appreciated!--Stuartbman (talk) 15:01, 21 July 2013 (UTC)

TypeError: Cannot read property 'oldid' of undefined
Hello all :)

the newest Parsoid run on my server and parse all wiki text correctly. But if i want to save a page, the parsoid console output is this: /var/www/services/Parsoid/js/api/ParserService.js:635 var doc, oldid = req.body.oldid || null; ^ TypeError: Cannot read property 'oldid' of undefined at app.post.cb (/var/www/services/Parsoid/js/api/ParserService.js:635:28) at getParserServiceEnv (/var/www/services/Parsoid/js/api/ParserService.js:376:4) at MWParserEnvironment.getParserEnv (/var/www/services/Parsoid/js/lib/mediawiki.parser.environment.js:279:3) at setupWikiConfig (/var/www/services/Parsoid/js/lib/mediawiki.parser.environment.js:299:3) at ApiRequest._processListeners.processSome (/var/www/services/Parsoid/js/lib/mediawiki.ApiRequest.js:102:17) at process.startup.processNextTick.process._tickCallback (node.js:245:9) worker 2942 died (1), restarting. - worker(2947) loading... - worker(2947) ready The POST request from Wiki looks ok, Content type is "application/x-www-form-urlencoded; charset=UTF-8", the content of the request: summary:Testedit minor:1 format:json action:visualeditoredit page:Testpage oldid:6833 basetimestamp:20130730144824 starttimestamp:20130803151237 html:htmlcontent token:a6e377be0566413a23b9e2d52b18f115+\ Has anyone an idea what the error is? Thanks!


 * Had the same problem after resolving mine above, help would be really appreciated. --Stuartbman (talk) 13:22, 8 August 2013 (UTC)
 * Also have had the very same problem (identical trace). Solved it with switching to epress 3.x, as indicated in the article under "Install dependencies": "I had to manually change package.json for the express item from 2.5.x to 3.x in order to parsoid to work". After changing Parsoid/js/packacke.json in this way, do an "npm install" again. (When the server runs, you will get a lot of deprecation warnings, but it seems that these can be ignored.) --95.33.104.9 20:13, 11 August 2013 (UTC)

Error contacting the Parsoid server
Hi, I've been trying all night to get the VisualEditor to work, but no luck.

I'm running MediaWiki 1.22alpha on Ubuntu Precise. The parsoid is working ok at http://wikineering.org:8000/, the wiki too at http://wikineering.org/mediawiki/, the api too at http://wikineering.org/mediawiki/api.php

The relevant configuration variables in  set as such: $wgVisualEditorParsoidURL = 'http://localhost:8000'; $wgVisualEditorParsoidPrefix = 'localhost'; And in, I have: parsoidConfig.setInterwiki( 'localhost', 'http://localhost/mediawiki/api.php' );

When I click on the "Edit" button, the VisualEditor loads. But when I hit "Save", I get a little "Error contacting the Parsoid server" error message right below the textarea for the edit summary. I've also tried with "wikineering" and "wikineering.org" instead of "localhost", and every combination I could come up with, but no luck. I downloaded the Lynx browser and checked that http://localhost:8000 and http://localhost/mediawiki/api.php are working. They are.

Any ideas? Thanks in advance!