This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on any information on this page.
We need to prototype and demo the Data and developer hub with a different skin. So set up a labs instance and copy the files.
// https://www.mediawiki.org/wiki/Manual:$wgImportSources $wgImportSources = array( 'mediawikiwiki', 'wikipedia', ); $wgUseInstantCommons = true;
Need to add interwiki
From Special:WantedPage, I realized interwiki table lacks en, foundation, m, meta, mw, phab, w, wikidata, wikitech Copied from mw.org's Special:Interwiki to local Special:Interwiki.
Edit MediaWiki:Mainpage to set the default page to the root of the imported pages, . (Prior to 2015-07 the main page was
Dev:Data_and_developer_hub but no longer using Dev: namespace, see discussion and phab:T369)
$wgImportSources let me "Import from another wiki" directly from mediawiki.org. By checking "Include all templates", I got a lot of dependent templates when I imported API:Data and developer hub
To get additional pages,
- I visited http://devhub.wmflabs.org/wiki/Special:WantedPages
- copy the text
- clean up whitespace, link text.
- exclude m:, w:, wikitech: , etc. -- these are interwiki prefixes I had not set up
- paste the list into Special:Export
- do include templates, don't include history
- export as file
Then Special:Import this as "Upload XML data" onto my wiki. Generated a weird title error but imported some stuff.
Also imported Template:MW_version, etc.
Most images are on commons. I added
$wgUseInstantCommons = true;, and my wiki knows they come from there with correct links to upload.wikimedia.org, e.g. File:Wikipedia Beta search on Android 4.4.4 2015-02-09.png.
InstantCommons images broken with multi-wiki setup
Yet, I don't see the images locally. If I requested http://devhub.wmflabs.org/images/thumb/c/c9/Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png , the image URL complained "/images/thumb/path/to/image.png" not found even though the file exists in /srv/mediawiki, I get
- Error generating thumbnail
- The source file 'Wikipedia_Beta_search_on_Android_4.4.4_2015-02-09.png' does not exist. . Permission problem?
mobilefrontend caused problems, these seem to trigger multiwiki behavior with multiple wiki settings in
/Vagrant/settings.d/wikis/, including a /vagrant/settings.d/wikis/commonswiki/ directory. So I disabled these two roles.
With InstantCommons, most images from commons "just worked". Some images were only on mediawiki.org. Special:Import doesn't work for these, it imports the page information but not the media file. So wget original file and Special:Upload it, e.g. File:2015-03-16_RCStream_CodePen.png and File:Trail_shoe_rotated.svg
Had to add
$wgFileExtensions, see Manual:Configuring_file_uploads#Configuring file types.
I edited Blueprint.php to change the navigation TOC elements to 'Dev:Data and developer hub', etc., and edited src/BlueprintXx to not show the namespace of these links.
The pages on mediawiki.org use features provided by the following roles:
- apisandbox, interwiki, parserfunctions, scribunto, translate, labeledsectiontransclude
- cirrussearch, mobilefrontend but these caused InstantCommons breakage above
Importing other API: pages required the inputbox extension (which doesn't have a role).