Page MenuHomePhabricator

prefs-vector-enable-vector-1-help is broken if you delete default interwiki entries
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

Possibly related: until very recently this wiki was only loading the monobook skin. I just started to have it load Vector to see if that will fix https://phabricator.wikimedia.org/T284715, and this came up when I went to my preferences to test that.
Tried to find where it is supposed to link to but that's set of pages and subpages is a warren, so not sure which one.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
MediaWiki 1.36.1
PHP 7.4.3 (cgi-fcgi)
MySQL 5.7.28-log
ICU 57.1

Event Timeline

Reedy subscribed.
	"prefs-vector-enable-vector-1-label": "Use Legacy Vector",
	"prefs-vector-enable-vector-1-help": "Over the next few years, we will be gradually updating the Vector skin. Legacy Vector will allow you to view the old version of Vector (as of December 2019). To learn more about the updates, go to our [[mw:Reading/Web/Desktop_Improvements|project page]].",

Screenshot 2021-06-23 at 23.36.45.png (300×1 px, 82 KB)

Do you have an Mw namespace? Or is mw missing from your interwiki list?

I have a MediaWiki namespace, but no MW one.

Following the instructions in https://www.mediawiki.org/wiki/Manual:Interwiki if I run https://XXXX.ca/api.php?action=query&meta=siteinfo&siprop=interwikimap I only see 4, and get another redlink to a [[mw: . And that then reminds me that years ago I probably purged the interwikis because there were 4 that I wanted and the rest had nothing to do with how we use our wiki. Does this mean I have to set up a interwiki link to the mediawiki wiki to fix interface error message links? If so, it would probably be good to add to https://www.mediawiki.org/wiki/Manual:Interwiki a hint that messing with some interwikis can break your wiki?

I understand why to abstract the links, but is it a good idea to do it with a prefix that isn't somehow protected?

I think it makes more sense to not use an interwiki syntax that can be changed/similar by third party wikis.

It should be a proper external URL so you're not relying on functionality that isn't guaranteed to exist on a third party wiki.

Reedy renamed this task from "Project Page" link in Preferences, Appearance, shows redlink because it goes to this private wiki rather than mediawiki.org to prefs-vector-enable-vector-1-help should use an external url, not an interwiki link.Jun 23 2021, 11:52 PM

Will this ticket reach the people who would make such decisions about how these links are set up inside interface pages? Or do I need to do something else to flag this?

Because the comment is more widespread. The API link (https://XXXX.ca/index.php?title=Mw:API&action=edit&redlink=1) to show me which interwikis there are also had its own redlinked [[mw: entry, so this might be a common practice.

That makes it a much larger issue, related to many different components.

Including all usages in all translations... There's 2461 usages in our hosted repos....

Reedy renamed this task from prefs-vector-enable-vector-1-help should use an external url, not an interwiki link to prefs-vector-enable-vector-1-help is broken if you delete default interwiki entries.Jun 24 2021, 12:37 AM
Jdlrobson subscribed.

For wikis in this situation I recommend simply updating the page [[ MediaWiki:prefs-vector-enable-vector-1-help ]] to reflect better text, or hiding the preference or text altogether.

We could update the i18n messages to use an external link, but that's a lot of messages to updating. This code is also temporary and might be removed/configurable soon: (T274267)

Adding interwiki tag in case there is some better way for us to resolve the use of interwikis across our projects. Perhaps mw: should be added by default?

For solution for anyone else who runs into this: running the following sql query to add the mw interwiki back in solved the direct problem for me:

INSERT INTO `mw_interwiki` (iw_prefix, iw_url, iw_local, iw_trans) VALUES ("mw", "https://www.mediawiki.org/wiki/$1", 0, 0)

But a better solution is likely needed for the underlying problem of many user interface pages linking via interwiki. That setup is easy to break inadvertently when cleaning out a table that contains a lot of legacy interwikis. Some don't even exist any longer (eg http://www.advogato.org) and the process by which sites are added or removed from the list is not addressed in https://www.mediawiki.org/wiki/Manual:Interwiki. That problem is probably out of the scope of this ticket, but if all the interwikis that are included by default were MWF wikis I likely wouldn't have cleaned it out.

There mostly isn't a process.

Even if they're updated in the canonical list inside MW core, MW doesn't update/re-integrate that (and hence doesn't add/remove/update rows). It's only used at install point.

If they're definitely dead, bugs filed or gerrit patches would be accepted to remove them.

See also: T273080: Stop managing both interwiki.list and interwiki.sql

The other option is to decline this ticket, declare the people doing this are shooting themselves in the foot, and lock the footgun with T240811.

Mediawiki is also run behind firewalls or entirely offline, so that doesn't seem like a good idea. I was actually thinking it would be good if there was a simple switch or extension that would change a mediawiki to get rid of any links onto the internet.

Change #1032044 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/skins/Vector@master] i18n: Replace mw: interwiki with url to mediawiki.org

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

Change #1032044 merged by jenkins-bot:

[mediawiki/skins/Vector@master] i18n: Replace mw: interwiki with url to mediawiki.org

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

It sounds like a decision has been made here to not add mw: by default, and replace all occurrences of it in messages with full mediawiki.org URLs. Is that correct? Should T240811 be declined?