Page MenuHomePhabricator

Remove $wgLexemeTalkNamespace setting, always use $wgLexemeNamespace + 1
Open, Needs TriagePublic


The WikibaseLexeme extension has two settings, $wgLexemeNamespace and $wgLexemeTalkNamespace, which together define the namespace used to store Lexemes. However, MediaWiki assumes that the talk namespace is always the subject namespace + 1; for example:

		return $this->isTalk( $index )
			? $index
			: $index + 1;

I don’t know what happens when you set $wgLexemeTalkNamespace to something other than $wgLexemeNamespace + 1, but I assume no good will come out of it. To me this seems like a footgun that exists for no good reason, and I propose we remove it and hard-code the talk namespace to be $wgLexemeNamespace + 1.

Historically, this code was apparently based on WikibaseMediaInfo, which at the time also had MediaInfoNamespace and MediaInfoTalkNamespace settings, originally introduced in Automatically register namespaces for MediaInfo. MediaInfoTalkNamespace was removed in Use extension registration for namespaces, but reintroduced as MediaInfoNamespaceTalk in Register MediaInfo talk namespace (though it’s not clear to me whether the MediaInfoNamespaceTalk config had any effect here, since I don’t see any code connecting it to the registered NS_MEDIAINFO_TALK namespace), before both MediaInfoNamespace and MediaInfoNamespaceTalk were finally removed in Make MediaInfo work with MCR.