Topic on Project:Support desk

Lizat17 (talkcontribs)

I have installed Visual Editor and Html2Wiki extensions on my wiki. I was haveing difficulty getting both running and got a Curl 7 error. I suspected that it may be configuration on my shared hosting so I asked them and they have responded as follows:


'Please note that the mentioned Node.Js engine is not available on any of our hosting plans. This being said, I am afraid to inform you that running the mentioned extension called Parsoid would not be possible on our shared or Cloud hosting platforms.'


My research found that VE had been converted to php, is that true? and the Parsoid page on MediaWiki says this ' In 2019, Parsoid was ported to PHP, and the PHP version replaced the JS version on the Wikimedia cluster in Dec. 2019. '


So it sound like it shouldn't need Node.Js?


Can anyone advise please?

Bawolff (talkcontribs)

It has been, but the php port is fairly new and a bit experimental. There are also like almost no docs anywhere.

It appears you do something along the lines of: (Assuming parsoid is installed in extensions/Parsoid). This also assumes you are using latest version of MediaWiki (or possibly even master branch

wfLoadExtension( 'Parsoid/PHP', "$IP/extensions/Parsoid/extension.json" );
$wgVirtualRestConfig['modules']['parsoid'] = [
        'url' => $wgServer . $wgScriptPath . '/rest.php',
        'restbaseCompat' => false
];

That's my best guess anyways. I don't really know. Your millage may vary.

Lizat17 (talkcontribs)

Thank you @

Bawolff This doesn't quite work it hangs: https://www.screencast.com/t/vrh7E4pW

I commented out the original Parsoid VE li which was:

#enable Parsoid to talk to VE

$wgVirtualRestConfig['modules']['parsoid'] = array(

    // URL to the Parsoid instance

    // Use port 8142 if you use the Debian package

    'url' => 'http://localhost:8000');


So now I have:

#Load Parsoid php (experimental, code supplied by Bawolff at WM Support)

wfLoadExtension( 'Parsoid/PHP', "$IP/extensions/Parsoid/extension.json" );

$wgVirtualRestConfig['modules']['parsoid'] = [

        'url' => $wgServer . $wgScriptPath . '/rest.php',

        'restbaseCompat' => false

];

#-------

# load the visual editor

wfLoadExtension( 'VisualEditor' );

// Enable by default for everybody

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


I tried Edit Source and got this error, does it provide any clues?

Fatal error: Uncaught Exception: Unable to open file /home/groktor4/public_html/wiki/extensions/Parsoid/extension.json: filemtime(): stat failed for /home/groktor4/public_html/wiki/extensions/Parsoid/extension.json in /home/groktor4/public_html/wiki/includes/registration/ExtensionRegistry.php:136 Stack trace: #0 /home/groktor4/public_html/wiki/includes/GlobalFunctions.php(52): ExtensionRegistry->queue('/home/groktor4/...') #1 /home/groktor4/public_html/wiki/LocalSettings.php(164): wfLoadExtension('Parsoid/PHP', '/home/groktor4/...') #2 /home/groktor4/public_html/wiki/includes/Setup.php(124): require_once('/home/groktor4/...') #3 /home/groktor4/public_html/wiki/includes/WebStart.php(81): require_once('/home/groktor4/...') #4 /home/groktor4/public_html/wiki/index.php(41): require('/home/groktor4/...') #5 {main} thrown in /home/groktor4/public_html/wiki/includes/registration/ExtensionRegistry.php on line 136

If you don't know what more I should do can you suggest somewhere else to ask?


Thank you

Bawolff (talkcontribs)

the php parsoid port is still new and very experimental. To a certain extent you are going to be on your own. You can try asking in the #wikimedia-visualeditor irc channel (or other irc chsnnels. Not sure which is the best) on freenode maybe.

Reply to "Parsiod & Node.js"