I run a test wiki at http://tools.wikimedia.pl/~saper/b/index.php running:
- MediaWiki git master (https://phabricator.wikimedia.org/r/revision/mediawiki/core.git;d9b2cdabdc0a11344158d81ee45a91675a51e945)
- Extension:Graphs (3af5fe8)
I have copied https://www.mediawiki.org/wiki/Extension:Graph/Demo/HistoricalFertilityRates example to the wiki and adjusted data source paths to wikiraw:///Fertility-csv and wikiraw:///WorldMap-iso3-json respectively.
Both data files have been copied from the mediawiki.org to the respective shortened names http://tools.wikimedia.pl/~saper/b/index.php?title=Fertility-csv and http://tools.wikimedia.pl/~saper/b/index.php?title=WorldMap-iso3-json
However, I keep getting "Error: URL hostname is not whitelisted: wikiraw:///Fertility-csv" on the console.
Setting
$wgGraphAllowedDomains = [ 'wikiraw' => [ 'tools.wikimedia.pl' ] ]; wfLoadExtension( "Graph" );
does not seem to help.
When I have added
$wgGraphAllowedDomains = [ 'wikiraw' => [ 'tools.wikimedia.pl' ], 'http' => [ 'tools.wikimedia.pl' ] ];
I started getting XHR error, since it tried getting
http://tools.wikimedia.pl/w/api.php?format=json&formatversion=2&action=query&prop=revisions&rvprop=content&titles=Fertility-csv
(my wiki lives in a subdirectory).
What is a proper way to whitelist 'wikiraw' pseudo-protocol?
How can run the wiki in a subdirectory and still use the wikiraw protocol?