Hi everyone, I've just installed VisualEditor + parsoid for mediawiki. This is the my configurator:
---> localsettings.js exports.setup = function( parsoidConfig ) { // The URL here is supposed to be your MediaWiki installation root parsoidConfig.setInterwiki( 'localhost', ' http://www.startupperday.com/api.php' );
// Use the PHP preprocessor to expand templates via the MW API (default true) //parsoidConfig.usePHPPreProcessor = false;
// Use selective serialization (default false) //parsoidConfig.useSelser = true;
// allow cross-domain requests to the API (default disallowed) parsoidConfig.allowCORS = '*'; };
---> LocalSettings.php require_once("$IP/extensions/VisualEditor/VisualEditor.php");
// Create VisualEditor namespace define( 'NS_VISUALEDITOR', 2500 ); define( 'NS_VISUALEDITOR_TALK', 2501 ); $wgExtraNamespaces[NS_VISUALEDITOR] = 'VisualEditor'; $wgExtraNamespaces[NS_VISUALEDITOR_TALK] = 'VisualEditor_talk';
// Allow using VisualEditor in the main namespace only (default) $wgVisualEditorNamespaces = array( NS_MAIN );
// Restrict VisualEditor to the VisualEditor namespace #$wgVisualEditorNamespaces = array(); #$wgVisualEditorNamespaces[] = NS_VISUALEDITOR;
// Enable by default for everybody $wgDefaultUserOptions['visualeditor-enable'] = 1;
// Don't allow users to disable it $wgHiddenPrefs[] = 'visualeditor-enable'; $wgVisualEditorParsoidURL = 'http://www.startupperday.com:8000/';
---> but when I try to save everything in mediawiki I get:
TypeError: Object.keys called on non-object at Function.keys (native) at Object.WikiConfig (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.WikiConfig.js:41:20) at null.<anonymous> (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.parser.environment.js:300:22) at processSome (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.ApiRequest.js:98:17) at process._tickCallback (node.js:415:13)
Can you help me? :(((
On Sat, May 11, 2013 at 04:46:37PM +0200, Marco De Nadai wrote:
TypeError: Object.keys called on non-object at Function.keys (native) at Object.WikiConfig (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.WikiConfig.js:41:20) at null.<anonymous> (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.parser.environment.js:300:22) at processSome (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.ApiRequest.js:98:17) at process._tickCallback (node.js:415:13)
Can you help me? :(((
Is this wiki readable by anonymous users? If not, the Parsoid service won't be able to get the necessary configuration from your wiki via the API.
There's a bug for this - https://bugzilla.wikimedia.org/show_bug.cgi?id=44483
You could try to fix the bug, but it's a tough one. You could also work around the issue by creating a cached JSON response in js/lib/baseconfig, where we have a bunch of default configs laying around. After doing that you may need to change some configuration or even code to get Parsoid's API to use that file instead of an API response, but it's possible.
If your wiki *isn't* read-only, then I'm sorry I rambled at you here :) we can help much more easily on IRC at #mediawiki-parsoid on Freenode, because of the relative speed of the communication with IRC.
Thanks for trying out the system! Hopefully we can help you get it working on your wiki.
Ta,
Thank you very much. I have all the permissions, so I will contact you via IRC :(
2013/5/11 Mark Holmquist mtraceur@member.fsf.org
On Sat, May 11, 2013 at 04:46:37PM +0200, Marco De Nadai wrote:
TypeError: Object.keys called on non-object at Function.keys (native) at Object.WikiConfig (/srv/ www.startupperday.com/Parsoid/js/lib/mediawiki.WikiConfig.js:41:20) at null.<anonymous> (/srv/
www.startupperday.com/Parsoid/js/lib/mediawiki.parser.environment.js:300:22 )
at processSome (/srv/
www.startupperday.com/Parsoid/js/lib/mediawiki.ApiRequest.js:98:17) at process._tickCallback (node.js:415:13)
Can you help me? :(((
Is this wiki readable by anonymous users? If not, the Parsoid service won't be able to get the necessary configuration from your wiki via the API.
There's a bug for this - https://bugzilla.wikimedia.org/show_bug.cgi?id=44483
You could try to fix the bug, but it's a tough one. You could also work around the issue by creating a cached JSON response in js/lib/baseconfig, where we have a bunch of default configs laying around. After doing that you may need to change some configuration or even code to get Parsoid's API to use that file instead of an API response, but it's possible.
If your wiki *isn't* read-only, then I'm sorry I rambled at you here :) we can help much more easily on IRC at #mediawiki-parsoid on Freenode, because of the relative speed of the communication with IRC.
Thanks for trying out the system! Hopefully we can help you get it working on your wiki.
Ta,
-- Mark Holmquist Software Engineer Wikimedia Foundation mtraceur@member.fsf.org https://wikimediafoundation.org/wiki/User:MHolmquist
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org