Topic on Project:Support desk

Configure Parsoid for Visual Editor

10
62.102.229.98 (talkcontribs)

Hello,

I'm struggling to configure Parsoid. The server runs well but when I try the round-trip test page for example, I get the following error :

error: No API URI available for prefix: enwiki; domain: undefined path: /_rt/mediawikiwiki/Parsoid 
Error: No API URI available for prefix: enwiki; domain: undefined

My configuration is the same for both LocalSettings.php and /usr/lib/parsoid/src/localsettings.js. Domain is set at what hostname command returns (wikirct), I choose the prefix myself (but I'm not sure it's the good way to do it) and the URI is something like http://mywebsite:80/api.php and when I test it with curl it works.

It looks like this in localsettings.js :

parsoidConfig.setMwApi({ prefix: 'wiki', domain: 'wikirct', uri: 'http://wikirct:80/api.php' });

It looks like this in LocalSettings.php :

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

'url' => 'http://wikirct:8142',

'domain' => 'wikirct',

'prefix' => 'wiki'

);

What did I do wrong ?

AhmadF.Cheema (talkcontribs)

By any chance the "<nowiki/>" isn't in your actual working code, is it?

Yolo33s (talkcontribs)

No, the <nowiki/> that you see is due to the post edition by Wargo but it not correspond to my copy/paste.

Yolo33s (talkcontribs)

Is there any chance that I got some help for this problem ? I know I asked a lot of questions during the last days but this one is the most important for me. I'm surprised to see that there is so little feedback on the web about the configuration of Parsoid and Visual Editor while I think a lot of people desire it working on their mediawiki !

If it is so easy to set up, maybe someone can tell me in a glimpse what seems wrong in my configuration. Indeed, there are only three thinks to put together : uri, prefix and domain...But I can't figure it out. Help is really needed.

AhmadF.Cheema (talkcontribs)

Seeing as no one else is giving a solution, maybe you can temporarily go for: VisualEditor/Installation on a shared host.

This uses an external cloud service (Heroku) for Parsoid setup, so any issues with your own server configuration shouldn't be a problem.

However, this method can have performance issues for the free account like slow loading, service "sleeping" after 30 minutes of non-use (which means that "waking up" of service will take slightly more time) and a total of 550 hours of "wake" time per month for the service. Shouldn't be a problem if the Wiki is low traffic, otherwise this can at-least act as a temporary solution.

174.114.48.41 (talkcontribs)
62.102.229.98 (talkcontribs)

Does the MW support know if the extension actually works with the 1.27.0 stable version ?

Wargo (talkcontribs)

Must work, because Wikipedia uses them.

62.102.229.98 (talkcontribs)

I finally managed to install Visual Editor with Parsoid on MW 1.27.0. While installing the translate extension, I did a re-install of the wiki and it made it works. The last problem that I'm facing is that users that are allowed to modify protected pages (with AccessControl Extension) can't modify them. Are there any incompatibility between Visual Editor and AccessControl ?

Nattsvartkatt (talkcontribs)

Hi. We're using a 14.04.05 install, 64 bit , Ubuntu server. It's a virtual server hosted by Citycloud.

Wiki is 1.27.1 (stable), and the VisualEditor version from the Extensions download page here, as instructed someplace here (git version is tied to specific devel version of mediawiki if I understand things correctly). Have followed the install and config steps at Parsoid/Setup.

http://localhost:8142/_wikitext/ always returns error: No API URI available for prefix: enwiki; domain: undefined path: /_wikitext/ no matter the alterations to /etc/mediawiki/parsoid/settings.js. Have tried setting string 'domain' and 'prefix', same in LocalSettings.php as in parsoid's settings.js, have tried without those since they are meant to be redundant now but then parsoid's log says "Invalid domain" (IP of server).

On trying Curl localhost/api.php , that is fetched alright. curl -L localhost:8142/domain_in_settings.js/v3/page/html/Main Page/ dgives ETIMEDOUT. On trying the editor in the Wiki the progress bar goes halfway then stalls with http500 and "check the api.php for details on how to use it". Thanks, but it is trying to visuealedtor-parse, a function supported by checking api.php in the browser since the VisualEditor extension loads.

Prior I got to a point where it worked to edit when not logged in, when logged in it gave this error(though can't seem to reproduce that). Regardless the "/_wikitext" has never worked. Trying the server :8142/ gives the parsoid hello page.

The parsoidConfig.setInterwik( variable hasn't made a seeming difference.

Thankful for any advice.

Reply to "Configure Parsoid for Visual Editor"