Topic on Project:Support desk

Error - VirtualRESTService for the document server is not defined

18
Smokinjo67 (talkcontribs)

I have installed Visual Editor


Upon clicking the edit button to load the document, I get a pop up window saying :


I asked the visual editor help group, and they said that since it seems to be related to RESTBase, that maybe the general support desk might be able to help.

The error is:

Error loading data from server: no_vrs: The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor. Would you like to retry?


I did find one reference to this error. It was in reference to SELINUX:


This error occurs usually on CENTOS 6 / 7 servers running SELINUX. In order to resolve this problem please disable SELINUX


I am running this on Debian 9

Can some one point me in the right direction as to why I am getting this, and possible a solution?

Thanks for your help

Joseph

MarkAHershberger (talkcontribs)
Smokinjo67 (talkcontribs)

Hello,

I do not have this variable in my config.

Is this something that should be i the LocalSettings file by default? Or, it needs to be added?

Thanks


Joseph

MarkAHershberger (talkcontribs)

You will need to add it.

Misterms735 (talkcontribs)

@MarkAHershberger

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

  // URL to the Parsoid instance

      // Use port 8142 if you use the Debian package

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

      // Parsoid "domain", see below (optional)

      'domain' => 'localhost',

      // Parsoid "prefix", see below (optional)

      'prefix' => 'localhost'

);

I have added this line, and now the error shows up like this: Error loading data from server: apierror-visualeditor-docserver-http: HTTP 404

Smokinjo67 (talkcontribs)

OK, Misterms got an error. But, you said it needs to be added. What do I add? The lonk you showed has 3 examples of the config:


$wgVirtualRestConfig = [
	'modules' => [],
	'global' => [
		# Timeout in seconds
		'timeout' => 360,
		# 'domain' is set to $wgCanonicalServer in Setup.php since MediaWiki 1.26
		'forwardCookies' => false,
		'HTTPProxy' => null,
	],
];

Parsoid

These are the default values when Parsoid is registered as a REST service, used when some keys are not defined.

$wgVirtualRestConfig['modules']['parsoid'] = [
	// URL to the Parsoid instance - use port 8142 if you use the Debian package - the parameter 'URL' was first used but is now deprecated (string)
	'url' => 'http://localhost:8000/',
	// Parsoid "domain" (string, optional) - MediaWiki >= 1.26
	'domain' => 'localhost',
	// Parsoid "prefix" (string, optional) - deprecated since MediaWiki 1.26, use 'domain'
	'prefix' => 'localhost',
	// Forward cookies in the case of private wikis (string or false, optional)
	'forwardCookies' => false,
	// request timeout in seconds (integer or null, optional)
	'timeout' => null,
	// Parsoid HTTP proxy (string or null, optional)
	'HTTPProxy' => null,
	// whether to parse URL as if they were meant for RESTBase (boolean or null, optional)
	'restbaseCompat' => null,
];

RESTBase

These are the default values when a RESTBase service is registered, used when some keys are not defined.

$wgVirtualRestConfig['modules']['restbase'] = [
	// RESTBase server URL (string)
	'url' => 'http://localhost:7231/',
	// Wiki domain to use (string)
	'domain' => 'localhost',
	// request timeout in seconds (integer or null, optional)
	'timeout' => 100,
	// cookies to forward to RESTBase/Parsoid (string or false, optional)
	'forwardCookies' => false,
	// HTTP proxy to use (string or null, optional)
	'HTTPProxy' => null,
	// whether to parse URL as if they were meant for Parsoid (boolean, optional)
	'parsoidCompat' => false,
	// whether to append the domain to the url
	'fixedUrl' => false,
];
Which one do I use (or a mix of them all?), and are there things to config for my server?

Misterm used another variation as well. What does a newbie mediawiki guy to do/use?


Thanks

MarkAHershberger (talkcontribs)

Use the parsoid one and and adjust the ports and things to your needs.

Shobhit0812 (talkcontribs)

I have added parsoid as you told and it works fine on windows WAMP server. Thanks

Misterms735 (talkcontribs)
MarkAHershberger (talkcontribs)

@Misterms735 404 probably means you have the server and port set up incorrectly. What port is parsoid set up to listen on?

Smokinjo67 (talkcontribs)

Thanks for the suggestion.


Since oru server uses Debian, who should use port 8142 here, right:

'url' => 'http://localhost:8000/',


Because I am using the latest version of mediawiki (1.3.x), I keep it at localhost, right?


// Forward cookies in the case of private wikis (string or false, optional)

How does this apply? Private meaning like internal for a company? Ours will eb visible, but not editable by the general public. Need an approved account to edit


// request timeout in seconds (integer or null, optional) 'timeout' => null,

What is this for?


// whether to append the domain to the url 'fixedUrl' => false,

What is this for?


Thanks


Joseph


MarkAHershberger (talkcontribs)

@Smokinjo67: In order:

who should use port 8142
yes
I keep it at localhost
yes
How does this apply? Private meaning like internal for a company? Ours will eb visible, but not editable by the general public. Need an approved account to edit
I've always forwarded cookies on my wikis.
What is this for?
Don't worry about these until you run into problems.
Misterms735 (talkcontribs)
Smokinjo67 (talkcontribs)

So, for the forward cookies, I put "true"?

Thanks

MarkAHershberger (talkcontribs)

right

Smokinjo67 (talkcontribs)

I finally had the time to work on this. I added the code and the comnfig we spoke of.


I got the following error:


Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Would you like to retry?


What might this mean?


Thanks


Joseph

Smokinjo67 (talkcontribs)

Can anyone give me clue as to how to deal with my error? Things are advancing, corrections being made. Hopefully, I cna get past this one:_)


Thanks for all help.


Joseph

Reply to "Error - VirtualRESTService for the document server is not defined"