Page MenuHomePhabricator

Wikibase RepoHooks:onContentModelCanBeUsedOn must be updated to work with MCR
Closed, ResolvedPublic

Description

Wikibase has been updated to work with MCR, however one piece of integration is missing.
The ContentModelCanBeUsedOn hook in core is not currently MCR ready and does not pass in the slot being checked at all.

As a result when a wikibase entity is defined as being contained within a secondary slot in a namespace and the hook is run the namespace is detected and the content model of the entity type is matched, instead of the content model of the main slot (probably wikitext).

The code in Wikibase needs to be able to do a lookup based on both the title / namespace and the slot name.
The ContentModelCanBeUsedOn hook in core probably needs to provide this.