Page MenuHomePhabricator

Make WikiLookup work when `$wgConf` isn't used
Closed, ResolvedPublic

Description

The $wgConf variable is not necessarily configured; in fact, it typically isn't in single-wiki environments. WikiLookup is entirely based on $wgConf, so it will claim that there are no wikis, if $wgConf is empty. This is obviously wrong. In that scenario, it should just use the current wiki ID available via WikiMap. Patchdemo's CentralAuth config basically does something like this.

I also briefly considered whether this should be a core feature (i.e., set $wgConf after loading LS.php if still empty), but that increases scope and I'm not sure if we should do it; see also T212739.

Related Objects

Event Timeline

Change #1189574 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Make WikiLookup work in wikis that don't use $wgConf

https://gerrit.wikimedia.org/r/1189574

Change #1189574 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make WikiLookup work in wikis that don't use $wgConf

https://gerrit.wikimedia.org/r/1189574

FYI that this happened. A quick test would suffice. Open Special:EnableEventRegistration on a wiki that does not use wgConf and confirm that you can still select that wiki in the event wikis field.

vaughnwalters subscribed.

This is working as expected on a single wiki without wgconf. sending to product sign off

Screenshot 2025-09-23 at 11.20.28 AM.png (1,424×182 px, 31 KB)