User:Lucamauri/Sandbox/WBOptions

= Wikibase Configuration =

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,  and   respectively, instead of individual global variables. So, if the setting  is described below, you would need to use   or   in LocalSettings.php.

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;  means that the wiki's own database shall be used. Note that on the client, this setting should usually be the same as the repoDatabase setting.
 * siteLinkGroups: The site groups to use in sitelinks. Must correspond to a value used to give the site group in the MediaWiki  table. Default is  . 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).

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   and  . In order to share caches between clients (and the repo), set a prefix based on the repo's name and   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 . Use   constants.
 * useChangesTable: Whether to record changes in the database, so they can be pushed to clients. Boolean, defaults to . May be set to   in situations where there are no clients to notify to preserve space.
 * Note that if this is, the   script should be run periodically to remove old changes from the database table.


 * disabledDataTypes: Array listing of disabled data types on a wiki. This setting is intended to be used in a new Wikibase installation without items yet, or to control deployment of new data types. This setting should be set to the same value in both client and repo settings. Defaults to an empty array.
 * maxSerializedEntitySize: The maximum serialized size of entities, in KB. Loading and storing will fail if this size is exceeded. This is intended as a hard limit that prevents very large chunks of data being stored or processed due to abuse or erroneous code. Defaults to MediaWiki core's  setting.
 * geoShapeStorageBaseUrl: Base URL of geo shape storage frontend. Used primarily to build links to the geo shapes. Will be concatenated with the page title, so should end with  or  . Special characters (e.g. space, percent, etc.) should not be encoded.
 * tabularDataStorageBaseUrl: Base URL of tabular data storage frontend. Used primarily to build links to the tabular data pages. Will be concatenated with the page title, so should end with  or  . Special characters (e.g. space, percent, etc.) should not be encoded.
 * useTermsTableSearchFields: Whether to use the search-related fields ( and  ) of the   table. This should not be disabled unless some other search backend is used (see   below).
 * forceWriteTermsTableSearchFields: If true, write search-related fields of the  table even if they are not used. Useful if you want to experiment with   and donâ€™t want missed updates in the table.

Basic Settings

 * entityNamespaces: Defines which kind of entity is managed in which namespace. It is given as an associative array mapping entity types such as  to namespace IDs. Mapping must be done for each type of entity that should be supported.
 * dataRightsUrl: URL to link to license for data contents. Defaults to  setting.
 * dataRightsText: Text for data license link. Defaults to  setting.
 * sparqlEndpoint: URL to the service description of the SPARQL end point for the repository. Defaults to null, meaning there is no SPARQL endpoint.
 * badgeItems: Items allowed to be used as badges. This setting expects an array of serialized item IDs pointing to their CSS class names, like . With this class name it is possible to change the icon of a specific badge.
 * preferredPageImagesProperties: List of image property ID strings, in order of preference, that should be considered for the  page property. Defaults to an empty array.
 * 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.
 * preferredGeoDataProperties: List of properties (by ID string), in order of preference, that are considered when finding primary coordinates for the GeoData extension on an entity. Defaults to an empty array.
 * localClientDatabases: An array of locally accessible client databases, for use by the  script. This setting determines to which wikis changes are pushed 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.
 * foreignRepositories: An associative array mapping foreign repository names to settings relevant to the particular repository. Each repository's settings are an associative array containing the following keys:
 * 'entityNamespaces': A map of entity type identifiers (strings) that the local wiki supports from the foreign repository to namespaces identifiers (numbers) related to pages of entities of the given type on foreign repository's wiki..
 * 'repoDatabase': A symbolic database identifier (string) that MediaWiki's LBFactory class understands.
 * 'baseUri': A base URI (string) for concept URIs. It should contain scheme and authority part of the URI.
 * 'prefixMapping': A prefix mapping array, see also: docs/foreign-entity-ids.wiki in the DataModel component.

Expert Settings

 * dispatchBatchChunkFactor: Chunk factor used internally by the  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.
 * dispatchDefaultBatchSize: Overrides the default value for batch-size in dispatchChanges.php
 * dispatchDefaultMaxChunks: Overrides the default value for max-chunks in dispatchChanges.php
 * dispatchDefaultDispatchInterval: Overrides the default value for dispatch-interval in dispatchChanges.php
 * dispatchDefaultDispatchRandomness: Overrides the default value for randomness in dispatchChanges.php
 * dispatchMaxTime: Overrides the default value for max-time in dispatchChanges.php
 * 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:.


 * urlSchemes: Which URL schemes should be allowed in URL data values. The default is . Other supported schemes are ,  ,  ,  ,  ,  ,  ,   and  . Schemes (protocols) added here will only have any effect if validation is supported for that protocol; that is, adding   will work, while adding   will do nothing.
 * formatterUrlProperty: Property to be used on properties that defines a formatter URL which is used to link external identifiers. The placeholder  will be replaced by the identifier. Example: On wikidata.org, this is set to , a string property named "formatter URL". When formatting identifiers, each identifiers property page is checked for it's formatter URL (e.g.  ) specified by the property from this setting.
 * canonicalUriProperty: Property to be used on properties that defines a URI pattern which is used to link external identifiers in RDF and other exports. The placeholder  will be replaced by the identifier. Example: On wikidata.org, this is set to , a string property named "URI used in RDF". When exporting identifiers to RDF or other formats, each identifiers property page is checked for it's URI pattern (e.g.  ) specified by the property from this setting.
 * transformLegacyFormatOnExport: Whether entity revisions stored in a legacy format should be converted on the fly while exporting. Enabled per default.
 * 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.
 * pagePropertiesRdf: Array that maps between page properties and Wikibase predicates for RDF dumps. Maps from database property name to an array that contains a key  (RDF property name, which will be prefixed by  ) and an optional key.
 * unitStorage: Definition for unit conversion storage. Should be in in the format  understands, example:.
 * supportedEntityTypesForEntitiesWithoutTermListings: Array of entity types that are supported on Special:EntitiesWithoutLabel and â€¦Description, typically  and  . Defaults to , which enables all numeric entity types.
 * dispatchingLockManager: If you want to use another lock mechanism for dispatching changes to clients instead of database locking (which can occupy too many connections to the master database), set its name in this config. See $wgLockManagers documentation in MediaWiki core for more information on configuring a locking mechanism inside core.
 * entitySearch: Set of settings controlling how we search for entities. Has following subsettings:
 * useCirrus: boolean|null, whether we should use CirrusSearch extension. Settings marked with (Cirrus) are relevant only when this setting is enabled. If set to null, CirrusSearch is not used unless the request has useCirrus=1. When using CirrusSearch, you can disable the  setting to save some space in the   table.
 * prefixSearchProfile: name of the label scoring profile to use for prefix search. The profile should be defined like examples in . (Cirrus)
 * prefixSearchProfiles: Loaded from, does not need to be defined manually. (Cirrus)
 * defaultPrefixRescoreProfile: name of the rescoring profile to use for prefix search. The profile should be defined in . (Cirrus)
 * fulltextSearchProfile: name of the search profile to use for fulltext search. The profile should be defined like examples in . (Cirrus)
 * fulltextSearchProfiles: search profiles to use for fulltext search. (Cirrus)
 * defaultFulltextRescoreProfile: name of the rescoring profile to use for fulltext search. The profile should be defined in . (Cirrus)
 * rescoreProfiles: Loaded from, does not have to be defined manually. (Cirrus).
 * statementBoost: Configuration to boost or deboost certain statement values (Cirrus).
 * useStemming: Configuration to use stemming analyzer for descriptions in certain languages. Array of two fields: index - use it for indexing, query - use main text field for querying. (Cirrus)


 * searchIndexProperties: Array of properties (by ID string) that should be included in the "statement_keywords" field of the search index. For now, only relevant when Cirrus search is enabled.
 * disabledRdfExportEntityTypes: Array of entity types that RDF export needs to be disabled for them, default: empty array, meaning nothing is disabled.

Basic Settings

 * namespaces: List of namespaces on the client wiki that should have access to repository items. Default:  (treated as setting is not set, ie. namespaces are enabled).
 * excludeNamespaces: List of namespaces on the client wiki to disable wikibase links, etc. for. Default:  . Example:.
 * repositories: An associative array mapping repository names to settings relevant to the particular repository. Local repository is identified using the empty string as its name. Each repository's settings are an associative array containing the following keys:
 * 'entityNamespaces': A map of entity type identifiers (strings) that the local wiki supports from the foreign repository to namespaces identifiers (numbers) related to pages of entities of the given type on foreign repository's wiki..
 * 'repoDatabase': A symbolic database identifier (string) that MediaWiki's LBFactory class understands. Note that  would mean "this wiki's database"!
 * 'baseUri': A base URI (string) for concept URIs. It should contain scheme and authority part of the URI.
 * 'prefixMapping': A prefix mapping array, see also: docs/foreign-entity-ids.wiki in the DataModel component.


 * repoUrl: The repository's base URL, including the schema (protocol) and domain; This URL can be protocol-relative. Default is.
 * 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.


 * siteGlobalID: This site's global ID (e.g. ), as used in the sites table. Default:.
 * siteLocalID: This site's local ID resp. language code (e.g. ). Default:.
 * Note: This setting will be removed once we can take this information from the sites table.

[             'item' => '', 'property' => 'Property' ]
 * siteGroup: This site's site group (e.g.  or  ) 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.
 * repoNamespaces: An array telling the client wiki which namespaces on the repository are used for which entity type. 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 (items in main namespace):
 * allowDataTransclusion: Switch to enable data transclusion features like the  parser function and the wikibase Scribunto module. Defaults to.
 * allowLocalShortDesc: Switch to enable local override of the central description with . Defaults to.
 * 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.
 * 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.
 * 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.
 * languageLinkSiteGroup: ID of the site group to be shown as language links. Defaults to, 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 . 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. Empty value will suppress this section.
 * propertyOrderUrl: URL to use for retrieving the property order used for sorting properties by property ID. Will be ignored if set to null.
 * disabledAccessEntityTypes: List of entity types that access to them in the client should be disabled.
 * entityUsagePerPageLimit: If a page in client uses too many aspects and entities, Wikibase issues a warning. This setting determines value of that threshold. The default is 100.

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  script to run, and this wiki to be listed in the   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, this setting just removes the changes from the user interface. The default is  . This is intended to temporarily prevent external changes from showing in order to find or fix some issue on a live site.
 * sendEchoNotification: If true, allows users on the client wiki to get a notification when a page they created is connected to a repo item. This requires the Echo extension.
 * echoIcon: If  is set to , you can also provide what icon the user will see. The correct syntax is   or   where   is relative to  . Defaults to   which means that there will be the default Echo icon.
 * disabledUsageAspects: Array of usage aspects that should not be saved in the  table. This supports aspect codes (like "T", "L" or "X"), but not full aspect keys (like "L.de"). For example   can be used to disable description and statement usages. Also a replacement usage type can be given in the form of.
 * fineGrainedLuaTracking: Enable fine grained tracking on entities accessed through Lua in client. No all (X) usage will be recorded, but each aspect will be recorded individually based on actual usage.
 * wikiPageUpdaterDbBatchSize: DEPRECATED. If set, acts as a default for purgeCacheBatchSize and recentChangesBatchSize.
 * purgeCacheBatchSize: Number of pages to process in each HTMLCacheUpdateJob, a job used to send client wikis notifications about relevant changes to entities. Higher value mean fewer jobs but longer run-time per job. Defaults to wikiPageUpdaterDbBatchSize (for backwards compatibility) or MediaWiki core's $wgUpdateRowsPerJob (which currently defaults to 300).
 * recentChangesBatchSize: Number of  table rows to create in each InjectRCRecordsJob, a job used to send client wikis notifications about relevant changes to entities. Higher value mean fewer jobs but longer run-time per job. Defaults to wikiPageUpdaterDbBatchSize (for backwards compatibility) or MediaWiki core's $wgUpdateRowsPerJob (which currently defaults to 300).
 * entityUsageModifierLimits: Associative array mapping usage type to the limit. If number of modifiers for the given aspect of an entity passes this limit, it turns all modifiers to a general entity usage in the given aspect. This is useful when with bad lua, a page in client uses all languages or statements in the repo causing the wbc_entity_usage become too big.