Topic on Project:Support desk

Visual Editor: HTTP 500

7
Summary by T. Nordlund

Variables uri set to localhost and domain to IP address

T. Nordlund (talkcontribs)

I run version 1.33.0 MediaWiki as a private Wiki and followed the installation guide for both Parsoid and VisualEditor. Upon finishing configuration I receive the following error when I click on edit on any existing page:

apierror-visualeditor-docserver-http: HTTP 500.

What I checked so far:

7.2 curl is installed

setMwApi is correctly set

My guess is the problem is within the configuration and therefore trouble with the API.

LocalSettings.php:

wfLoadExtension( 'VisualEditor' );

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

$wgHiddenPrefs[] = 'visualeditor-enable';

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

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

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

    'domain' => 'localhost',

    'prefix' => 'localhost'

);

$wgVisualEditorAllowLossySwitching=false;

$wgSessionsInObjectCache = true;

$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

config.yaml:

uri: 'http://xyz/mediawiki/api.php'

(only line that was configured)

Any help is greatly appreciated.

MarkAHershberger (talkcontribs)

Could you verify that parsoid is running? It would also help to see if parsoid is logging any errors.

T. Nordlund (talkcontribs)
MarkAHershberger (talkcontribs)

What if you just go to http://mydomain:8142/? "Cannot GET" sounds like it is running but can't communicate with the wiki.

T. Nordlund (talkcontribs)

Then it welcomes me to the Parsoid web service. What could be reasons for it not being able to communicate?

MarkAHershberger (talkcontribs)

Then, yes, I think the problem is that Parsoid needs to be configured to talk to the MW installation. Try changing the xyz from config.yaml:

uri: 'http://xyz/mediawiki/api.php'

to localhost.

T. Nordlund (talkcontribs)

I edited the uri to localhost, that alone didn't solve the problem as now the HTTP error went from 500 to 404. Then I additionally set the domain variable to xyz (IP address) and now it works. Thank you very much.