MediaWiki Visual Editor Parsoid 404 Error: Difference between revisions

No edit summary
No edit summary
Line 27: Line 27:
== My configuration ==
== My configuration ==


For my config.yaml file, just two lines;
For my config.yaml (Parsoid service configuration) file, just two lines;


 
 
Line 35: Line 35:
</syntaxhighlight>
</syntaxhighlight>


Also, I noticed a dash ( - ) in front of a comment hash tag ( # ) that I thought was a typo, but some people actually referenced it as it was supposed to be there, so I left it.
For my LocalSettings.php (MediaWiki configuration) file, the following code, using the same fully qualified domain name and path, plus the port number of the Parsoid service (8000 in my case).<syntaxhighlight lang="bat">
wfLoadExtension( 'VisualEditor' );
 
//Enable VisualEditor by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
 
// Optional: Set VisualEditor as the default for anonymous users
// otherwise they will have to switch to VE
// $wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
 
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
 
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
 
// Parsoid configuration
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance
// Use port 8142 if you use the Debian package
// url must not end in a slash, otherwise it might give a 404 error
'url' => 'http://DomainNameAndPath:8000',
// Parsoid "domain", see below (optional)
'domain' => 'localhost',
// Parsoid "prefix", see below (optional)
//'prefix' => 'wiki.terrabase.info',
//If you run a private wiki then you have to set the following variable to true:
'forwardCookies' => true
);
</syntaxhighlight>
 
Also, I noticed a dash ( - ) in front of a comment hash tag ( # ) that I thought was a typo, but some people actually referenced it as it was supposed to be there.  It worked, so I left it.
</div>
</div>