Help:Avoid namespace conflicts when using Semantic MediaWiki and Wikibase on the same instance
From semantic-mediawiki.org
Semantic extension(s): | Semantic MediaWiki |
Further extension(s): | Wikibase |
Keyword(s): | namspace · namespace conflict |
Description:
Use this configuration in your "LocalSettings.php" file after the inclusion of Semantic MediaWiki and Wikibase to avoid namespace conflicts between the two:1
// Avoid conflict with SMW namespaces.
$wgHooks['CanonicalNamespaces'][] = static function ( &$list ) {
global $wgExtraNamespaces;
$wgExtraNamespaces[WB_NS_PROPERTY] = $list[WB_NS_PROPERTY] = 'Wikibase_property';
$wgExtraNamespaces[WB_NS_PROPERTY_TALK] = $list[WB_NS_PROPERTY_TALK] = 'Wikibase_property_talk';
};
In this example, the namespaces for Wikibase get renamed.
References
- ^ Semantic MediaWiki: GitHub issue comment gh:smw:6113:2799869041