Thread:Project:Support desk/Installing Parsoid/reply (2)

Hi,

I managed to complete the installation required for the Visual Editor plugin (Universal Language Selector, parsoid). However, Parsoid required more configuration setup to do. Packages needed for Parsoid to run :

1) nodejs, npm 2) parsoid itself

After installing nodejs and npm via repo install, and parsoid via developer install ( I could not get the key for repo install, & was not sure if this method was applicable for Red Hat Enterprise Linux).

And then I edited the LocalSettings.php file in mediawiki directory, and localsettings.js in parsoid/api. Lines I added in LocalSettings.php :

require_once("$IP/extensions/VisualEditor/VisualEditor.php");

$wgVisualEditorNamespaces[] = NS_PROJECT;

$wgDefaultUserOptions['visualeditor-enable'] = 1;

$wgHiddenPrefs[] = 'visualeditor-enable';

$wgVisualEditorParsoidURL = 'http://localhost:8000';

$wgVisualEditorParsoidPrefix = 'localhost';

$wgVisualEditorParsoidForwardCookies = true;

require_once( "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php" );

Lines I added/edited in localsettings.js :

exports.setup = function(parsoidConfig) { // Set your own user-agent string // Otherwise, defaults to "Parsoid/" //parsoidConfig.userAgent = "My-User-Agent-String";

// The URL of your MediaWiki API endpoint. parsoidConfig.setMwApi('AirAsiaWiki', { uri: 'http://wiki.airasia.com/w/api.php' }); // To specify a proxy (or proxy headers) specific to this prefix (which       // overrides defaultAPIProxyURI) use: /* '''

'''//      parsoidConfig.setMwApi('localhost', {

'''//              uri: 'http://localhost/w/api.php',  //                 set `proxy` to `null` to override and force no proxying.'''

//              proxy: {

//                      uri: 'http://my.proxy:1234/',

//                      headers: { 'X-Forwarded-Proto': 'https' } // headers are optional

//              }

//       });

The lines that I have edited are in bold. The bold commented section was initially not commented out. I commented it out. I hope this is the correct thing to do.

I then start the parsoid service and it does not completely start. It hangs at the last line below :

[aigini_agss@aamy-aamsapp01 parsoid]$ sudo node api/server.js

[info][master][27500] initializing 7 workers [info][worker][27507] loading ... [info][worker][27502] loading ... [info][worker][27505] loading ... [info][worker][27509] loading ... [info][worker][27504] loading ... [info][worker][27512] loading ... [info][worker][27511] loading ... [info][worker][27507] ready on :8000 [info][worker][27509] ready on :8000 [info][worker][27505] ready on :8000 [info][worker][27502] ready on :8000 [info][worker][27511] ready on :8000 [info][worker][27504] ready on :8000 [info][worker][27512] ready on :8000

How do I resolve this issue? I tried editing/changing the lines in the files above, like for the parameter :

$wgVisualEditorParsoidURL = 'http://localhost:8000';

I tried changing the port to both 8142 and 8000. Still the same result.

I also added these lines in localsettings.js :

// Allow override of port/interface: parsoidConfig.serverPort = process.env.OPENSHIFT_NODEJS_PORT; parsoidConfig.serverInterface = process.env.OPENSHIFT_NODEJS_IP;

Even the section I mentioned I commented out, initially I tried starting the parsoid service by leaving it uncommented. Then I commented it out and tried again. Still no difference.

Please help.