MediaWiki extensions manual
Implementation
User interface
Description
Allows defining constraints on Wikibase properties and checks that the constraints are met when the properties are used in statements on entities
Author(s)
Students at Hasso-Plattner-Institute and WMDE
Latest version
continuous updates
Compatibility policy
Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki
1.26+
Database changes
Yes
Composer
wikibase/constraints
Tables
wbqc_constraints
License
GNU General Public License 2.0 or later
Download
$wgWBQualityConstraintsMaximumQuantityId
$wgWBQualityConstraintsInstanceOfId
$wgWBQualityConstraintsMinimumDateId
$wgWBQualityConstraintsAllowedUnitsConstraintId
$wgWBQualityConstraintsFormatConstraintId
$wgWBQualityConstraintsMandatoryConstraintId
$wgWBQualityConstraintsCacheCheckConstraintsTTLSeconds
$wgWBQualityConstraintsTypeCheckMaxEntities
$wgWBQualityConstraintsSubclassOfRelationId
$wgWBQualityConstraintsCheckOnEntityDurationWarningSeconds
$wgWBQualityConstraintsSparqlThrottlingFallbackDuration
$wgWBQualityConstraintsEnableSuggestionConstraintStatus
$wgWBQualityConstraintsOneOfConstraintId
$wgWBQualityConstraintsLabelInLanguageConstraintId
$wgWBQualityConstraintsInverseConstraintId
$wgWBQualityConstraintsValueRequiresClaimConstraintId
$wgWBQualityConstraintsSuggestionConstraintId
$wgWBQualityConstraintsCheckFormatConstraint
$wgWBQualityConstraintsTypeConstraintId
$wgWBQualityConstraintsWikibaseMediaInfoId
$wgWBQualityConstraintsCheckDurationWarningSeconds
$wgWBQualityConstraintsShowConstraintViolationToNonLoggedInUsers
$wgWBQualityConstraintsUsedAsQualifierConstraintId
$wgWBQualityConstraintsSingleBestValueConstraintId
$wgWBQualityConstraintsExceptionToConstraintId
$wgWBQualityConstraintsCheckReferences
$wgWBQualityConstraintsMultiValueConstraintId
$wgWBQualityConstraintsInstanceOfRelationId
$wgWBQualityConstraintsEnableConstraintsCheckJobsRatio
$wgWBQualityConstraintsLexemeLanguageConstraintId
$wgWBQualityConstraintsCacheCheckConstraintsResults
$wgWBQualityConstraintsIntegerConstraintId
$wgWBQualityConstraintsDifferenceWithinRangeConstraintId
$wgWBQualityConstraintsInstanceOrSubclassOfRelationId
$wgWBQualityConstraintsConstraintCheckedOnQualifiersId
$wgWBQualityConstraintsUsedAsReferenceConstraintId
$wgWBQualityConstraintsFormatCacheMapSize
$wgWBQualityConstraintsSymmetricConstraintId
$wgWBQualityConstraintsPropertyScopeId
$wgWBQualityConstraintsYearUnit
$wgWBQualityConstraintsAsReferencesId
$wgWBQualityConstraintsWikibasePropertyId
$wgWBQualityConstraintsContemporaryConstraintId
$wgWBQualityConstraintsSparqlMaxMillis
$wgWBQualityConstraintsPropertyConstraintId
$wgWBQualityConstraintsFormatCheckerShellboxRatio
$wgWBQualityConstraintsCheckQualifiers
$wgWBQualityConstraintsValueTypeConstraintId
$wgWBQualityConstraintsConstraintStatusId
$wgWBQualityConstraintsConstraintCheckedOnMainValueId
$wgWBQualityConstraintsAdditionalSparqlEndpoints
$wgWBQualityConstraintsSeparatorId
$wgWBQualityConstraintsSecondUnit
$wgWBQualityConstraintsClassId
$wgWBQualityConstraintsMaximumDateId
$wgWBQualityConstraintsStartTimePropertyIds
$wgWBQualityConstraintsPropertiesWithViolatingQualifiers
$wgWBQualityConstraintsCacheCheckConstraintsMaximumRevisionIds
$wgWBQualityConstraintsAsQualifiersId
$wgWBQualityConstraintsAsMainValueId
$wgWBQualityConstraintsPropertyScopeConstraintId
$wgWBQualityConstraintsWikibaseSenseId
$wgWBQualityConstraintsMinimumQuantityId
$wgWBQualityConstraintsItemRequiresClaimConstraintId
$wgWBQualityConstraintsConstraintEntityTypesId
$wgWBQualityConstraintsAllowedEntityTypesConstraintId
$wgWBQualityConstraintsWikibaseLexemeId
$wgWBQualityConstraintsWikibaseItemId
$wgWBQualityConstraintsNoneOfConstraintId
$wgWBQualityConstraintsDistinctValuesConstraintId
$wgWBQualityConstraintsWikibaseFormId
$wgWBQualityConstraintsConstraintScopeId
$wgWBQualityConstraintsConstraintClarificationId
$wgWBQualityConstraintsSyntaxClarificationId
$wgWBQualityConstraintsFormatAsARegularExpressionId
$wgWBQualityConstraintsNamespaceId
$wgWBQualityConstraintsMandatoryQualifierConstraintId
$wgWBQualityConstraintsEndTimePropertyIds
$wgWBQualityConstraintsQualifierOfPropertyConstraintId
$wgWBQualityConstraintsRangeConstraintId
$wgWBQualityConstraintsEnableConstraintsCheckJobs
$wgWBQualityConstraintsRelationId
$wgWBQualityConstraintsCommonsLinkConstraintId
$wgWBQualityConstraintsSparqlTimeoutExceptionClasses
$wgWBQualityConstraintsNoBoundsConstraintId
$wgWBQualityConstraintsSparqlEndpoint
$wgWBQualityConstraintsCheckDurationInfoSeconds
$wgWBQualityConstraintsUsedForValuesOnlyConstraintId
$wgWBQualityConstraintsLanguagePropertyId
$wgWBQualityConstraintsAllowedQualifiersConstraintId
$wgWBQualityConstraintsConflictsWithConstraintId
$wgWBQualityConstraintsSingleValueConstraintId
$wgWBQualityConstraintsConstraintCheckedOnReferencesId
$wgWBQualityConstraintsSparqlHasWikibaseSupport
$wgWBQualityConstraintsEnableConstraintsImportFromStatements
$wgWBQualityConstraintsSubclassOfId
$wgWBQualityConstraintsCitationNeededConstraintId
$wgWBQualityConstraintsCheckOnEntityDurationInfoSeconds
$wgWBQualityConstraintsPropertyId
Quarterly downloads
10 (Ranked 129th )
Translate the WikibaseQualityConstraints extension if it is available at translatewiki.net
Issues
Open tasks · Report a bug
The WikibaseQualityConstraints extension allows defining constraints on Wikibase Properties and checks that the constraints are met when the Properties are used in Statements on Entities.
The checks are strictly informational: the extension does not ensure that the constraints are met, it merely informs editors when they are being violated.
For more information, see the Property constraints portal on Wikidata.
Installation
Download and move the extracted WikibaseQualityConstraints
folder to your extensions/
directory. Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseQualityConstraints
Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev
in the extension directory. (See task T173141 for potential complications.)
Add the following code at the bottom of your LocalSettings.php file: wfLoadExtension ( 'WikibaseQualityConstraints' );
Configure as required.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration
See the "config" section in the extension.json file.
This extension is being used on one or more Wikimedia projects . This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.
This extension is included in the following wiki farms/hosts and/or packages:
This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm.