Difference between revisions of "Extension:Wikibase"
m (→Set up PHP Configuration: See also the configuration files) |
m (→Set up PHP Configuration{{Anchor|PHP Configuration setup}}) |
||
Line 47: | Line 47: | ||
require_once "$IP/extensions/Wikibase/repo/Wikibase.php"; | require_once "$IP/extensions/Wikibase/repo/Wikibase.php"; | ||
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php"; | require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php"; | ||
+ | $wgWBRepoSettings['siteLinkGroups'][]= "biowikifarm";# needs needs maintenance/importSites.php with <group>biowikifarm</group> | ||
break; | break; | ||
// clients | // clients |
Revision as of 16:31, 13 November 2017
Contents
Wikibase Installation
This is for REL1_26
Prepare extension Wikibase
Warning: do not run installation in the extension folder as root only as www-data because it is updated also by subversion and gets stuck if extension folders have mixed group rights.
# show help
sudo -u www-data /usr/local/bin/composer.phar help install
# probably upgrade composer first
# sudo /usr/local/bin/composer.phar self-update
cd /usr/share/mediawiki26/extensions-rich-features/Wikibase/
# cd /usr/share/mediawiki26/extensions-simple-features/Wikibase/
sudo -u www-data /usr/local/bin/composer.phar install
Prepare and create a new Wiki
General steps:
- use bash script to create a new wiki structure
./create_or_upgrade_shared_wiki-core-resource-structure.sh
- copy another database structure or use
z_en_template
in phpmyadmin to manually set up the new databasewikibasewiki
wikibasewiki
- grant database rights to
wikibasewiki
GRANT SELECT , INSERT , UPDATE , DELETE , DROP , INDEX ,CREATE TEMPORARY TABLES ON `wikibasewiki` . * TO 'wikiuser'@'localhost';
- set up php configuration in global file MediaWikiCommonSettings_REL1_26.php
- change to the new wiki and run
cd /var/www/wikibasewiki
sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php
- finish set up on Wikibase repository and Wikibase clients
- configure server (add at least header “Origin: ...”)
See also open issues:
Set up PHP Configuration
In MediaWikiCommonSettings_REL1_26.php
something like:
/**
* Extension:Wikibase
* enable repository or clients
* possibly depending on $wgCrossSiteAJAXdomains
*/
switch($wgDBname) {
// repo
case "wikibasewiki":
$wgEnableWikibaseRepo = true; $wgEnableWikibaseClient = false;
require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
$wgWBRepoSettings['siteLinkGroups'][]= "biowikifarm";# needs needs maintenance/importSites.php with <group>biowikifarm</group>
break;
// clients
case "openmedia":
case "onwiki_test":
case "onwiki":
$wgEnableWikibaseRepo = false; $wgEnableWikibaseClient = true;
require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
/* see
* require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
*/
$wgWBClientSettings['repoUrl'] = '//biowikifarm.net';
$wgWBClientSettings['repoScriptPath'] = '/wikibasewiki';
$wgWBClientSettings['repoArticlePath'] = '/wikibase/$1';
$wgWBClientSettings['siteGlobalID'] = 'wikibasewiki';
$wgWBClientSettings['repoDatabase'] = 'wikibasewiki';
$wgWBClientSettings['changesDatabase'] = 'wikibasewiki';
// optional settings
$wgWBClientSettings['repoNamespaces'] = array(
'wikibase-item' => 'Item', //leave empty if items are in the main namespace
'wikibase-property' => 'PropertyWikibase'
);
$wgWBClientSettings['siteGroup'] = 'biowikifarm'; # needs maintenance/importSites.php with <group>biowikifarm</group>
break;
}
if (defined('WB_NS_PROPERTY') AND defined('WB_NS_PROPERTY_TALK')) {
// redefine Property of wikibase it collides with semantic media wiki
switch(preg_replace("@^en-.+@","en", $wgLanguageCode)) {
case "en":
$wgExtraNamespaces[WB_NS_PROPERTY] = 'PropertyWikibase';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = 'PropertyWikibase_talk';
}
}
// end Extension:Wikibase
See also the configuration files contained in:
- /var/www/wikibasewiki/extensions/Wikibase/lib/config
- /var/www/wikibasewiki/extensions/Wikibase/client/config (client)
- /var/www/wikibasewiki/extensions/Wikibase/repo/config (repository)
Finish Setup of Wikibase Repository
See also open issues:
For the repository Wiki:
- configure global PHP settings
- run
./maintenance/update.php
- run maintenance scripts to specific to extension:Wikibase
cd /var/www/wikibasewiki/extensions/Wikibase
sudo -u www-data php ./lib/maintenance/populateSitesTable.php --dbuser wikiadmin --conf="/var/www/wikibasewiki/LocalSettings.php"
sudo -u www-data php ./repo/maintenance/rebuildItemsPerSite.php --dbuser wikiadmin --conf="/var/www/wikibasewiki/LocalSettings.php"
Finish Setup of Wikibase Clients
For each client Wiki:
- configure PHP settings
- run
./maintenance/update.php
- run maintenance scripts to specific to extension:Wikibase
# Bioflor (for testing)
cd /var/www/v-on/bfl
sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php
cd /var/www/v-on/bfl/extensions/Wikibase
sudo -u www-data php ./lib/maintenance/populateSitesTable.php --dbuser wikiadmin --conf="/var/www/v-on/bfl/LocalSettings.php"
sudo -u www-data php ./client/maintenance/populateInterwiki.php --dbuser wikiadmin --conf="/var/www/v-on/bfl/LocalSettings.php"
# Offene-Naturfuehrer
cd /var/www/v-on/w
sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php
cd /var/www/v-on/w/extensions/Wikibase
sudo -u www-data php ./lib/maintenance/populateSitesTable.php --dbuser wikiadmin --conf="/var/www/v-on/w/LocalSettings.php"
sudo -u www-data php ./client/maintenance/populateInterwiki.php --dbuser wikiadmin --conf="/var/www/v-on/w/LocalSettings.php"
# openmedia
cd /var/www/v-species/o
sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php
cd /var/www/v-species/o/extensions/Wikibase
sudo -u www-data php ./lib/maintenance/populateSitesTable.php --dbuser wikiadmin --conf="/var/www/v-species/o/LocalSettings.php"
sudo -u www-data php ./client/maintenance/populateInterwiki.php --dbuser wikiadmin --conf="/var/www/v-species/o/LocalSettings.php"
Server Configuration
Wikibase operates via CORS (cross-origin resource sharing, https://www.mediawiki.org/wiki/Manual:CORS), that means some headers must be present in the client Wikis to work with the Wikibase repository, e.g.:
Origin: https://offene-naturfuehrer.de
See also:
- program code in
/usr/share/mediawiki26/includes/api/ApiMain.php
line 561 functionhandleCORS()
- https://enable-cors.org/server_nginx.html
- https://stackoverflow.com/questions/14499320/how-to-properly-setup-nginx-access-control-allow-origin-into-response-header-bas
- /etc/nginx/set_cors_header.conf
- /etc/nginx/access_control_allow_origin_nginx.conf
Open Issues
Installation Problems: ENGINE MyISAM vs. InnoDB
sudo -u www-data php ./maintenance/update.php --dbuser wikiadmin --conf ./LocalSettings.php
failed:
# Function: DatabaseBase::sourceFile( /usr/share/mediawiki26/extensions-rich-features/Wikibase/repo/includes/store/sql/../../../sql/Wikibase.sql ) # Error: 1071 Specified key was too long; max key length is 767 bytes (localhost:8088) # MyISAM
It is probably due to an older MySQL version that allows only a smaller byte range for unique indices (see stackoverflow). I (AP) had to create table wb_items_per_site
as MyISAM and execute manually /usr/share/mediawiki26/extensions-rich-features/Wikibase/repo/includes/store/sql/../../../sql/Wikibase.sql
:
CREATE TABLE IF NOT EXISTS /*_*/wb_items_per_site (
ips_row_id BIGINT unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, -- row ID
ips_item_id INT unsigned NOT NULL, -- Id of the item
ips_site_id VARBINARY(32) NOT NULL, -- Site identifier (global)
ips_site_page VARCHAR(310) NOT NULL -- Prefixed title of the page
) ENGINE=MyISAM, DEFAULT CHARSET=utf8; -- usually ENGINE=InnoDB, changed because of failure
CREATE UNIQUE INDEX /*i*/wb_ips_item_site_page ON /*_*/wb_items_per_site (ips_site_id, ips_site_page);
-- #1071 - Specified key was too long; max key length is 767 bytes on older InnoDB ENGINE, try with MyISAM
CREATE INDEX /*i*/wb_ips_site_page ON /*_*/wb_items_per_site (ips_site_page);
CREATE INDEX /*i*/wb_ips_item_id ON /*_*/wb_items_per_site (ips_item_id);
Sites Table
To me (AP) it is not clear how extension:Wikibase operates with the table sites
in managing its interwiki data links. I did import new sites to the database wikibasewiki
:
sudo -u www-data php ./maintenance/importSites.php --dbuser wikiadmin --conf ./LocalSettings.php /path/to/biowikifarmSitesList.xml
biowikifarmSitesList.xml
…<sites version="1.0" xmlns="http://www.mediawiki.org/xml/sitelist-1.0/">
<site type="mediawiki">
<globalid>abcd_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://abcd.biowikifarm.net/w/$1</path>
<path type="page_path">https://abcd.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>applecore</globalid>
<group>biowikifarm</group>
<path type="file_path">https://applecore.biowikifarm.net/w/$1</path>
<path type="page_path">https://applecore.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>bayernflorawiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.bayernflora.de/w/$1</path>
<path type="page_path">https://wiki.bayernflora.de/web/$1</path>
</site>
<site type="mediawiki">
<globalid>binhum_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.binhum.net/w/$1</path>
<path type="page_path">https://wiki.binhum.net/web/$1</path>
</site>
<site type="mediawiki">
<globalid>botknow_test</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/w/$1</path>
<path type="page_path">https://biowikifarm.net/v-botknow-test/web/$1</path>
</site>
<site type="mediawiki">
<globalid>cetafdigiwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://cetafdigitization.biowikifarm.net/c/$1</path>
<path type="page_path">https://cetafdigitization.biowikifarm.net/cdig/$1</path>
</site>
<site type="mediawiki">
<globalid>cetafidentifierwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://cetafidentifiers.biowikifarm.net/id/$1</path>
<path type="page_path">https://cetafidentifiers.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>dataqualitywiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://dataquality.biowikifarm.net/w/$1</path>
<path type="page_path">https://dataquality.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>difa_smns_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.difa-smns.de/w/$1</path>
<path type="page_path">https://wiki.difa-smns.de/web/$1</path>
</site>
<site type="mediawiki">
<globalid>dinawiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://dina-project.net/w/$1</path>
<path type="page_path">https://dina-project.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>esciencewiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://escience.biowikifarm.net/esciencewiki/$1</path>
<path type="page_path">https://escience.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>filteredpushwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.filteredpush.org/w/$1</path>
<path type="page_path">https://wiki.filteredpush.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>fna</globalid>
<group>biowikifarm</group>
<path type="file_path">https://fna.biowikifarm.net/w/$1</path>
<path type="page_path">https://fna.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>fnabase</globalid>
<group>biowikifarm</group>
<path type="file_path">https://fnabase.biowikifarm.net/w/$1</path>
<path type="page_path">https://fnabase.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>gbif_d_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.gbif.de/w/$1</path>
<path type="page_path">https://wiki.gbif.de/web/$1</path>
</site>
<site type="mediawiki">
<globalid>gfbio_internal_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://gfbio.biowikifarm.net/int/$1</path>
<path type="page_path">https://gfbio.biowikifarm.net/internal/$1</path>
</site>
<site type="mediawiki">
<globalid>gfbio_public_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://gfbio.biowikifarm.net/w/$1</path>
<path type="page_path">https://gfbio.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>gfbio_public_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://gfbio.biowikifarm.net/min/$1</path>
<path type="page_path">https://gfbio.biowikifarm.net/minimal/$1</path>
</site>
<site type="mediawiki">
<globalid>gfbio_terms_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://gfbio.biowikifarm.net/t/$1</path>
<path type="page_path">https://gfbio.biowikifarm.net/terms/$1</path>
</site>
<site type="mediawiki">
<globalid>goldengatewiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/goldengate/$1</path>
<path type="page_path">https://biowikifarm.net/goldenGATE/$1</path>
</site>
<site type="mediawiki">
<globalid>ibiospherewiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.pro-ibiosphere.eu/w/$1</path>
<path type="page_path">https://wiki.pro-ibiosphere.eu/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>ideswiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://ides.snsb.info/w/$1</path>
<path type="page_path">https://ides.snsb.info/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>infoflora_ch_de</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.infoflora.ch/swissflorawiki/d/$1</path>
<path type="page_path">https://wiki.infoflora.ch/swissflorawiki/de/$1</path>
</site>
<site type="mediawiki">
<globalid>infoflora_ch_fr</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.infoflora.ch/swissflorawiki/f/$1</path>
<path type="page_path">https://wiki.infoflora.ch/swissflorawiki/fr/$1</path>
</site>
<site type="mediawiki">
<globalid>ispiwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.pestinfo.org/w/$1</path>
<path type="page_path">https://wiki.pestinfo.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>k2n_handbook</globalid>
<group>biowikifarm</group>
<path type="file_path">https://www.keytonature.eu/h/$1</path>
<path type="page_path">https://www.keytonature.eu/handbook/$1</path>
</site>
<site type="mediawiki">
<globalid>k2n_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://www.keytonature.eu/w/$1</path>
<path type="page_path">https://www.keytonature.eu/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>kuratorwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.datakurator.org/w/$1</path>
<path type="page_path">https://wiki.datakurator.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>lias_glossary</globalid>
<group>biowikifarm</group>
<path type="file_path">https://glossary.lias.net/w/$1</path>
<path type="page_path">https://glossary.lias.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>malesiana_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://floramalesiana.biowikifarm.net/w/$1</path>
<path type="page_path">https://floramalesiana.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>metawiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/metawiki/$1</path>
<path type="page_path">https://biowikifarm.net/meta/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_3dhandbook</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/3d-handbook/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/3d-handbook/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_arbeitstagung2015</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/arbeitstagung2015/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/arbeitstagung2015/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_ausstellung</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/ausstellung/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/ausstellung/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_collmg</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/sammlung/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/sammlung/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_cs</globalid>
<group>biowikifarm</group>
<path type="file_path">https://citizen-science-leitfaden.de/csleitfaden/$1</path>
<path type="page_path">https://citizen-science-leitfaden.de/w/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_dig</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/dig/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/digitalisierung/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_fp</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/forschungsprojekte/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/forschungsprojekte/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_help</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/hilfe/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/hilfe/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_intra</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/intra/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/intranet/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_issue</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/issue/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/issue/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_mus</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/w/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_panda</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/panda/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/panda/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_pandaen</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/panda_en/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/panda/en/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_sammler</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/sammler/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/sammler/$1</path>
</site>
<site type="mediawiki">
<globalid>mfn_verwertung</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/verwertung/$1</path>
<path type="page_path">https://biowikifarm.net/v-mfn/verwertung/$1</path>
</site>
<site type="mediawiki">
<globalid>modco</globalid>
<group>biowikifarm</group>
<path type="file_path">https://www.mod-co.net/w/$1</path>
<path type="page_path">https://www.mod-co.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>naturgucker_repo</globalid>
<group>biowikifarm</group>
<path type="file_path">https://media.naturgucker.de/r/$1</path>
<path type="page_path">https://media.naturgucker.de/repo/$1</path>
</site>
<site type="mediawiki">
<globalid>nescent</globalid>
<group>biowikifarm</group>
<path type="file_path">https://nescent.biowikifarm.net/nescent/$1</path>
<path type="page_path">https://nescent.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>nnvmwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://nnvm.eu/w/$1</path>
<path type="page_path">https://nnvm.eu/web/$1</path>
</site>
<site type="mediawiki">
<globalid>onwiki_test</globalid>
<group>biowikifarm</group>
<path type="file_path">https://offene-naturfuehrer.de/bfl/$1</path>
<path type="page_path">https://offene-naturfuehrer.de/bflor/$1</path>
</site>
<site type="mediawiki">
<globalid>onwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://offene-naturfuehrer.de/w/$1</path>
<path type="page_path">https://offene-naturfuehrer.de/web/$1</path>
</site>
<site type="mediawiki">
<globalid>onwiki_temp25</globalid>
<group>biowikifarm</group>
<path type="file_path">https://offene-naturfuehrer.de/w25/$1</path>
<path type="page_path">https://offene-naturfuehrer.de/web25/$1</path>
</site>
<site type="mediawiki">
<globalid>openmedia</globalid>
<group>biowikifarm</group>
<path type="file_path">https://species-id.net/o/$1</path>
<path type="page_path">https://species-id.net/openmedia/$1</path>
</site>
<site type="mediawiki">
<globalid>orowiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://orowiki.org/w/$1</path>
<path type="page_path">https://orowiki.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>phytopathwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://phytopathology.net/w/$1</path>
<path type="page_path">https://phytopathology.net/Portal/$1</path>
</site>
<site type="mediawiki">
<globalid>plantnet_terms_en</globalid>
<group>biowikifarm</group>
<path type="file_path">https://terms.plantnet-project.org/terms/e/$1</path>
<path type="page_path">https://terms.plantnet-project.org/en/$1</path>
</site>
<site type="mediawiki">
<globalid>plantnet_terms_fr</globalid>
<group>biowikifarm</group>
<path type="file_path">https://terms.plantnet-project.org/terms/f/$1</path>
<path type="page_path">https://terms.plantnet-project.org/fr/$1</path>
</site>
<site type="mediawiki">
<globalid>plantnet_uses_en</globalid>
<group>biowikifarm</group>
<path type="file_path">https://uses.plantnet-project.org/uses/e/$1</path>
<path type="page_path">https://uses.plantnet-project.org/en/$1</path>
</site>
<site type="mediawiki">
<globalid>plantnet_uses_fr</globalid>
<group>biowikifarm</group>
<path type="file_path">https://uses.plantnet-project.org/uses/f/$1</path>
<path type="page_path">https://uses.plantnet-project.org/fr/$1</path>
</site>
<site type="mediawiki">
<globalid>plaziwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.plazi.org/w/$1</path>
<path type="page_path">https://wiki.plazi.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>pmedwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.phytomedizin.org/w/$1</path>
<path type="page_path">https://wiki.phytomedizin.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>practicalplants_mw</globalid>
<group>biowikifarm</group>
<path type="file_path">https://practicalplants.org/html/w/$1</path>
<path type="page_path">https://practicalplants.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>specialmedia</globalid>
<group>biowikifarm</group>
<path type="file_path">https://species-id.net/s/$1</path>
<path type="page_path">https://species-id.net/specialmedia/$1</path>
</site>
<site type="mediawiki">
<globalid>species_fr</globalid>
<group>biowikifarm</group>
<path type="file_path">https://species-id.net/f/$1</path>
<path type="page_path">https://species-id.net/fr/$1</path>
</site>
<site type="mediawiki">
<globalid>specieswiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://species-id.net/w/$1</path>
<path type="page_path">https://species-id.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>spnhc</globalid>
<group>biowikifarm</group>
<path type="file_path">https://spnhc.biowikifarm.net/w/$1</path>
<path type="page_path">https://spnhc.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>studienstiftungswiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/studienstiftungswiki/$1</path>
<path type="page_path">https://biowikifarm.net/studienstiftung/$1</path>
</site>
<site type="mediawiki">
<globalid>synthesyswiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://synthesys3.biowikifarm.net/s/$1</path>
<path type="page_path">https://synthesys3.biowikifarm.net/syn3/$1</path>
</site>
<site type="mediawiki">
<globalid>tdwg_bsci</globalid>
<group>biowikifarm</group>
<path type="file_path">https://tdwgbsci.biowikifarm.net/bsci/$1</path>
<path type="page_path">https://tdwgbsci.biowikifarm.net/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>tdwg_groups</globalid>
<group>biowikifarm</group>
<path type="file_path">https://groups.tdwg.org/w/$1</path>
<path type="page_path">https://groups.tdwg.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>tdwg_sig</globalid>
<group>biowikifarm</group>
<path type="file_path">https://groups.tdwg.org/sig/$1</path>
<path type="page_path">https://groups.tdwg.org/SemanticData/$1</path>
</site>
<site type="mediawiki">
<globalid>tdwg_terms</globalid>
<group>biowikifarm</group>
<path type="file_path">https://terms.tdwg.org/w/$1</path>
<path type="page_path">https://terms.tdwg.org/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>telabotanica_enwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.tela-botanica.org/e/$1</path>
<path type="page_path">https://wiki.tela-botanica.org/en/$1</path>
</site>
<site type="mediawiki">
<globalid>telabotanica_frwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://wiki.tela-botanica.org/f/$1</path>
<path type="page_path">https://wiki.tela-botanica.org/fr/$1</path>
</site>
<site type="mediawiki">
<globalid>terminology_sandbox_wiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://terminology-sandbox.biowikifarm.net/w/$1</path>
<path type="page_path">https://terminology-sandbox.biowikifarm.net/wiki$1</path>
</site>
<site type="mediawiki">
<globalid>test26wmf5</globalid>
<group>biowikifarm</group>
<path type="file_path">https://test.biowikifarm.net/testing/alvaro/test26wmf5/$1</path>
<path type="page_path">https://test.biowikifarm.net/w/$1</path>
</site>
<site type="mediawiki">
<globalid>testwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/testwiki/$1</path>
<path type="page_path">https://biowikifarm.net/test/$1</path>
</site>
<site type="mediawiki">
<globalid>testwiki2</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/testwiki2/$1</path>
<path type="page_path">https://biowikifarm.net/test2/$1</path>
</site>
<site type="mediawiki">
<globalid>thripswiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://thrips.info/w/$1</path>
<path type="page_path">https://thrips.info/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>ukcountywiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/w/$1</path>
<path type="page_path">https://biowikifarm.net/v-ukcounty/web/$1</path>
</site>
<site type="mediawiki">
<globalid>wbwiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://diversityworkbench.net/w/$1</path>
<path type="page_path">https://diversityworkbench.net/Portal/$1</path>
</site>
<site type="mediawiki">
<globalid>zooterms</globalid>
<group>biowikifarm</group>
<path type="file_path">https://species-id.net/zt/$1</path>
<path type="page_path">https://species-id.net/zooterms/$1</path>
</site>
<site type="mediawiki">
<globalid>zsm_entomology</globalid>
<group>biowikifarm</group>
<path type="file_path">https://zsm-entomology.de/w/$1</path>
<path type="page_path">https://zsm-entomology.de/wiki/$1</path>
</site>
<site type="mediawiki">
<globalid>wikibasewiki</globalid>
<group>biowikifarm</group>
<path type="file_path">https://biowikifarm.net/wikibasewiki/$1</path>
<path type="page_path">https://biowikifarm.net/wikibasewiki/$1</path>
</site>
</sites>
Wikibase Configuration (official documentation)
See the folder doc/options.wiki
or for REL1_26 https://phabricator.wikimedia.org/diffusion/EWBA/browse/REL1_26/docs/options.wiki
This document describes the configuration of the Wikibase extensions.
As usual, the extension is configured in MediaWiki's LocalSettings.php file. However, Wikibase settings are placed in associative arrays, $wgWBRepoSettings
and $wgWBClientSettings
respectively, instead of individual global variables. So, if below the setting foo
is described below, you would need to use $wgWBClientSettings['foo']
in LocalSettings.php.
Common Settings
Basic Settings
- changesDatabase
- The database that changes are recorded to for processing by clients. This must be set to a symbolic database identifier that MediaWiki's LBFactory class understands;
false
means that the wiki's own database shall be used. Note that on the client, this setting should usually be the same as therepoDatabase
setting. - siteLinkGroups
- The site groups to use in sitelinks. Must correspond to a value used to give the site group in the MediaWiki
sites
table. Default is array( "wikipedia" ). This defines which groups of sites can be linked to Wikibase items. Note that this setting replaces the old siteLinkGroup setting, which only allowed for a single group. - specialSiteLinkGroups
- This maps one or more site groups into a single "special" group. This is useful if sites from multiple site groups should be shown in a single "special" section on item pages, instead of one section per site group. To show these site-groups you have to add the group "special" to the siteLinkGroups setting (see above).
- localClientDatabases
- An array of locally accessible client databases, for use by the
dispatchChanges.php
script. This setting determines which wikis changes are pushed to directly. It must be given either as an associative array, mapping global site IDs to logical database names, or, of the database names are the same as the site IDs, as a list of databases. The default is an empty array, indicating no local client databases.
Expert Settings
- sharedCacheKeyPrefix
- Prefix to use for cache keys that should be shared among a wikibase repo and all its clients. The default is constructed from $wgDBname and WBL_VERSION. In order to share caches between clients (and the repo), set a prefix based on the repo's name and WBL_VERSION or a similar version ID.
- NOTE: The default may change in order to use the repo's database name automatically.
- sharedCacheDuration
- The default duration of entries in the shared object cache, in seconds. Default is 3600 seconds = 1 hour.
- sharedCacheType
- The type of cache to use for the shared object cache. Defaults to $wgMainCacheType. Use CACHE_XXX constants.
- entityPrefixes
- ID prefixes to use for the different entity types, as an associative array mapping prefixes to entity type constants. Default:
array(
'q' => Wikibase\DataModel\Entity\Item::ENTITY_TYPE,
'p' => Wikibase\DataModel\Entity\Property::ENTITY_TYPE,
'y' => Wikibase\DataModel\Entity\Query::ENTITY_TYPE,
);
- Warning: do not change this if you already have Wikibase entities in your database, since they may become unreadable!
- useChangesTable
- Whether to record changes in the database, so they can be pushed to clients. Boolean, defaults to
true
. May be set to false in situations where there are no clients to notify, to preserve space. Note that if this is true, thepruneChanges.php
script should be run periodically to remove old changes from the database table. - changeHandlers
- Array mapping change type IDs to handler classes. May be used by extensions to register additional change classes.
- dataTypes
- Array listing the available data types that can be used in snaks (and thus in claims and statements). The relevant data type identifiers are defined by the DataType extension. Default:
array(
'wikibase-item',
'commonsMedia',
)
Repository Settings
Basic Settings
- entityNamespaces
- Defines which kind of entity is managed in which namespace; this is given as an associative array mapping content model IDs such as
CONTENT_MODEL_WIKIBASE_ITEM
to namespace IDs. This setting is required for each kind of entity that should be supported. - dataRightsUrl
- Url to link to license for data contents. Defaults to $wgRightsUrl setting.
- dataRightsText
- Text for data license link. Defaults to $wgRightsText setting.
- badgeItems
- Items allowed to be used as badges. This setting expects an array of serialized item ids pointing to their CSS class names, like
array( 'Q101' => 'wb-badge-goodarticle' )
. With this class name it is possible to change the icon of a specific badge. - conceptBaseUri
- Base URI for building concept URIs (for example used in Rdf output). This has to include the protocol and domain, only an entity identifier will be appended.
Expert Settings
- dispatchBatchChunkFactor
- Chunk factor used internally by the
dispatchChanges.php
script. The default is 3. If most clients are not interested in most changes, this factor can be raised to lower the number of database queries needed to fetch a batch of changes. - idBlacklist
- A list of IDs to reserve and skip for new entities. IDs are given as integers, the blacklist applies to all types of entities. Note: this may change in the future to allow separate blacklists for different kinds of entities.
- multilang-limits
- Limits to impose on multilanguage strings like labels, descriptions and such. Supported limits:
- length
- the maximum length of the string, in characters.
- Default:
array( 'length' => 250 )
- urlSchemes
- Which URL schemes should be allowed in URL data values. The default is array( 'http', 'https' ). Other supported schemes are 'ftp' and 'mailto'. Schemes (protocols) added here will only have any effect if validation is supported for that protocol; that is, adding 'mailto' will work, while adding 'gopher' will do nothing.
- formatterUrlProperty
- Property to be used on properties that defines a formatter URL which is used to link identifiers. The placeholder
$1
will be replaced by the identifier. Example:https://www.wikidata.org/entity/$1
- transformLegacyFormatOnExport
- Whether entity revisions stored in a legacy format should be converted on the fly while exporting. Enabled per default.
- subscriptionLookupMode
- how the repo determines which clients need to be notified about changes to which entity (see also the useLegacyChangesSubscription setting in the client). Possible values:
'sitelinks'
- Use only sitelinks from the wb_items_per_site table to track subscriptions (legacy mode).
'subscriptions'
- Use explicit subscription tracking via the wb_changes_subscription table.
'subscriptions+sitelinks'
- Use information from both tables (compatibility mode).
- Default is
'subscriptions'
. - If the repo is configured to act as it's own client, the subscriptionLookupMode repo setting must match the useLegacyChangesSubscription client setting.
- allowEntityImport
- allow importing entities via Special:Import and importDump.php. Per default, imports are forbidden, since entities defined in another wiki would have or use IDs that conflict with entities defined locally.
Client Settings
Basic Settings
- namespaces
- List of namespaces on the client wiki that should have access to repository items. Default:
array()
(treated as setting is not set; all namespaces enabled) - excludeNamespaces
- List of namespaces on the client wiki to disable wikibase links, etc. for. Default:
array()
Example:array( NS_USER_TALK )
- repoUrl
- The repository's base URL, including the schema (protocol) and domain; This URL can be protocol-relative. Default is
'//wikidata.org'
. Note: this may be removed once we can get this information from the sites table. - repoConceptBaseUri
- The base of the repository's concept URIs. Default is
'repoUrl/entity/'
. Note: this may be removed once we can get this information from the sites table. - repoScriptPath
- The repository's script path. Default is $wgScriptPath, assuming that the repo's script path is the same as this wiki's script path. Note: this may be removed once we can get this information from the sites table.
- repoArticlePath
- The repository's article path. Default is $wgArticlePath, assuming that the repo's article path is the same as this wiki's script path. Note: this may be removed once we can get this information from the sites table.
- sort
- How to sort language links in the side bar. Possible values:
'code'
- by language code
'alphabetic'
- By language name (
meta-native-languagename
) 'alphabetic_revised'
- By language name (alternative) (
meta-native-languagename-firstword
) 'none'
- Don't sort. Basically, the order of the links is not guaranteed. Deprecated and dysfunctional.
- Default is
'code'
. - sortPrepend
- List of language codes to put on top of the language links in the side bar. Default:
array()
. Note: this may change to use global wiki IDs instead of language codes in the future. - interwikiSortOrders
- Array of arrays of language codes, specifying custom sort orders for interwiki links; default options provided include
'code'
,'alphabetic'
,'alphabetic_revised'
,'alphabetic_sr'
, and'alphabetic_fy'
. - alwaysSort
- Sort links from wikitext even if
{{noexternallanglinks:*}}
is used. Default:true
. - siteGlobalID
- This site's global ID (e.g.
'itwiki'
), as used in the sites table. Default:$wgDBname
. - siteLocalID
- This site's local ID resp. language code (e.g.
'it'
). Default:$wgLanguageCode
. Note: this setting will be removed once we can take this information from the sites table. - siteGroup
- This site's site group (e.g.
'wikipedia'
or'wikivoyage'
) as used in the sites table. The setting is optional and falls back to site store lookup. For performance reasons, it may be desireable to set this explicitly to avoid lookups. - repoSiteId
- Site id of connected repository wiki. Default is to assume client and repo, so this setting defaults to siteGlobalID.
- repoSiteName
- Site name of the connected repository wiki. Default is to assume client and repo are same wiki, so defaults to global $wgSitename setting. If not the same wiki, defaults to 'Wikidata'. This setting can also be set to an i18n message key and will be handled as a message, if the message key exists so that the repo site name can be translatable.
- repoDatabase
- The logical name of the repository database, in a form that LBFactory can understand. If not
null
, the client wiki will access the repository's database directly, instead of locally caching information received via change notifications. Default: <node>null</code>. Note thatfalse
would mean "this wiki's database"! Note: this is currently required to be notnull
, since local caching is not fully implemented.
// default for repo items in main namespace
- repoNamespaces
- An array telling the client wiki which namespaces on the repository are used for which kind of entity. This is given as an associative array mapping entity type IDs such as Item::ENTITY_TYPE, to namespace names. This information is used when constructing links to entities on the repository. Default:
array(
'wikibase-item' => ,
'wikibase-property' => 'Property'
)
- allowDataTransclusion
- switch to enable data transclusion features like the {{#property}} parser function and the wikibase Scribunto module. Defaults to true.
- allowArbitraryDataAccess
- switch to allow accessing arbitrary items from the wikibase Scribunto module and the via the parser functions (instead of just the item which is linked to the current page). Defaults to true.
- allowDataAccessInUserLanguage
- switch to allow accessing data in the user's language rather than the content language from the wikibase Scribunto module and the via the parser functions. Useful for multilingual wikis: Allows users to split the ParserCache by user language. Defaults to false.
- entityAccessLimit
- limit for the number of different full entities that can be loaded on any given page, via Scribunto or the property parser function. Defaults to 200.
- propagateChangesToRepo
- switch to enable or disable the propagation of client changes to the repo. Defaults to true.
- languageLinkSiteGroup
- the ID of the site group to be shown as language links. Defaults to null, which means the site's own site group.
- badgeClassNames
- A list of additional CSS class names for site links that have badges. The array has to consist of serialized item ids pointing to their CSS class names, like
array( 'Q101' => 'badge-goodarticle' )
. Note that this extension does not add any CSS to actually display the badges. - otherProjectsLinks
- Site global id list of sites which should be linked in the other projects sidebar section.
- otherProjectsLinksByDefault
- Whether to show links to other projects per default. If not set, the links can be enabled as a beta feature (see otherProjectsLinksBeta).
- otherProjectsLinksBeta
- If this is set to true links to other projects will be available as beta feature, enabling every user to turn them on/ off if wanted. (Only applies if other project links aren't enabled per default and the BetaFeatures extension is installed)
Expert Settings
- injectRecentChanges
- whether changes on the repository should be injected into this wiki's recent changes table, so they show up on watchlists, etc. Requires the
dispatchChanges.php
script to run, and this wiki to be listed in thelocalClientDatabases
setting on the repository. - showExternalRecentChanges
- whether changes on the repository should be displayed on Special:RecentChanges, Special:Watchlist, etc on the client wiki. In contrast to
injectRecentChanges
, this setting just removes the changes from the user interface. The default isfalse
. This is intended to temporarily prevent external changes from showing in order to find or fix some issue on a live site.'DirectSqlStore'
- Access the repo's database directly to fetch entity data etc.
'CachingSqlStore'
- No direct access to the repo's database. Use cache information received from change notifications. Warning: dies is currently dysfunctional.
null
- Automatic, use
'DirectSqlStore'
ifrepoDatabase
is set,'CachingSqlStore'
if not.
- Caveat: should always be
null
at the moment, because some code relies on therepoDatabase
setting to determine whether the local cache tables should be used. - useLegacyUsageIndex
- whether the sitelinks table should be used to emulate usage tracking. Should be set to true if the approproate database schema change has not been deployed yet.
- useLegacyChangesSubscription
- whether the sitelinks table should be used to emulate notification subscriptions. Should be set to true if the appropriate database schema change has not been deployed to the repository database yet. See also the subscriptionLookupMode repo setting.