Page MenuHomePhabricator

Cannot remove a site by editing $wgSiteMatrixSites
Closed, ResolvedPublic

Description

Because the configuration in extension.json is merged with your config in $wgSiteMatrixSites, you can't actually remove any of the default options -- Wikipedia, Wiktionary, etc. If you're running another wiki farm, this situation is less than awesome. I could, of course, edit extension.json, but Miraheze likes to track upstream whenever possible.

If I'm wrong about this, please let me know how to remove a site from the matrix on top. Thanks!

Event Timeline

Taking a wild guess but probably intentional.

But since we don't like forking repos we could see what others have to say about this :P

If it is intentional, I suppose we could host a fork of this. All we'd have to do is delete a few lines from the extension.json file, track upstream otherwise, and warn people outside the WMF to use our fork instead of the official one. Somehow this solution seems suboptimal, but I'd be willing to do it.

I would like to get at least one opinion from inside the project before doing that, however.

There should be a way to do this later in the setup process, probably with a hook/callback, either with $wgExtensionFunctions, or something like https://www.mediawiki.org/wiki/Manual:Extension_registration#Customizing_registration but the latter may require altering the extension.json which is a bit meh

What you really need is a way to have it just unconditionally override the configuration...

Change 300080 had a related patch set uploaded (by Reedy):
Remove default WMF sites from SiteMatrix

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

Change 300081 had a related patch set uploaded (by Reedy):
Apply WMF specific SiteMatrix config in CommonSettings.php

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

Although there should probably be a better way of overriding/removing these... It's WMF specific config, that shouldn't really be there. The extension is still setup pretty WMF specific, with messages and such (which can be overridden), but this should probably be done in WikimediaMessages, rather than in the extension itself...

Messages that need addressing:

	"sitematrix": "List of Wikimedia wikis",
	"sitematrix-summary": "This special page lists all Wikimedia wikis.",
	"sitematrix-desc": "Displays a [[Special:SiteMatrix|list of Wikimedia wikis]]",
	"sitematrix-others": "Other Wikimedia projects",
	"apihelp-sitematrix-description": "Get Wikimedia sites list.\n\nThe code (technically dbname/wikiid) is either the language code + project code for content projects or the subdomain + main domain for all the others.",
	"apihelp-sitematrix-param-type": "Filter the Site Matrix by type:\n;special:One off and multilingual Wikimedia projects.\n;language:Wikimedia projects under this language code.",

Maybe a better task should be opened for de-WMFifying the extension?

@labster see also T140941 and leave any comments you have about de-WMF-ising the extension more generally too... :)

Change 300081 merged by jenkins-bot:
Apply WMF specific SiteMatrix config in CommonSettings.php

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

Change 300080 merged by jenkins-bot:
Remove default WMF sites from SiteMatrix

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

Reedy claimed this task.

So, removing wikis is no longer needed, as the list is empty by default :)

I'll probably backport to REL1_27 for usefulness across the board

Change 300421 had a related patch set uploaded (by Reedy):
Remove default WMF sites from SiteMatrix

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

Change 300421 merged by jenkins-bot:
Remove default WMF sites from SiteMatrix

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

Thanks, this is great work. Sorry I didn't reply earlier, as I've been swamped by $dayjob stuff. I do have some other suggestions, but I'll reply in T140941.