Page MenuHomePhabricator

Undeploy the InterwikiSorting extension from Wikipedia production
Closed, ResolvedPublic

Description

Is InterwikiSorter not needed in production anymore, then?

I don't believe so, sounds like it can be undeployed! woo!

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

In my opinion this seems something that should be merged to MediaWiki core.

In my opinion this seems something that should be merged to MediaWiki core.

This sounds like it would pretty reasonable, but would need buy in from the Platform Engineering team / core owners.

Ladsgroup subscribed.

In the light of vector 2022 being rolled out, I would like to revisit this. I know some users still use non-compat version but the benefit of sorting in a nice way doesn't outweigh the cost of maintaining this extension in production (and translations, etc.). I'm sure these users can live with alphabetical sorting of the language code.

the benefit of sorting in a nice way doesn't outweigh the cost of maintaining this extension in production (and translations, etc.)

Is this cost high, though? There are no open bugs for this extension, and a couple of tasks that have been resolved over years seem to have involved only minor work. This extension also has only one translatable message.

Besides, current randomly ordered language links in Vector 2022 feel much like a bug (I know in theory it has got something to do with languages that user has visited but...). Hopefully sorting orders provided by this extension can be used eventually in Vector 2022, too (see T301787#10172462).

Many times when we want to remove code, we get the sentence that "it's not much code" and that can be true for one place or one extension but they add up because we have many places like that. Just a couple days ago I saw the exact same thing somewhere else: T412819#11466909 so I won't repeat myself but we have 3M line of code in production (just mediawiki) and we, the devs, cannot reasonably maintain this ocean of tech debt.

Another aspect on the cost of this extension: Every time a new language is introduced, we need to add it in a giant file in mediawiki-config: https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InterwikiSortOrders.php

@Lydia_Pintscher Hi 👋 do you think Wikidata team can own this extension? If not, I‌ will undeploy it.

Hi Amir, we just had a look at it would be amazing if you could undeploy it. Thank you so much.

Change #599064 restored by Ladsgroup:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - I: Disable everywhere

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

Change #599065 restored by Ladsgroup:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - II: Drop loading ability

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

Change #599066 restored by Ladsgroup:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - III: Drop InterwikiSortOrders.php

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

Change #599067 restored by Ladsgroup:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - IV: Drop all config

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

Change #599068 restored by Ladsgroup:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - V: Stop loading i18n

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

Entry for tech news: InterwikiSorting extension has been undeployed and non-compact version of interwiki links will be ordered by their language code instead.

Edit mercilessly

Change #599064 merged by jenkins-bot:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - I: Disable everywhere

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

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:34:23Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:599064|Undeploy InterwikiSorting - I: Disable everywhere (T253764)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:36:33Z] <ladsgroup@deploy2002> ladsgroup, jforrester: Backport for [[gerrit:599064|Undeploy InterwikiSorting - I: Disable everywhere (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:41:21Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:599064|Undeploy InterwikiSorting - I: Disable everywhere (T253764)]] (duration: 06m 58s)

Change #599065 merged by jenkins-bot:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - II: Drop loading ability

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

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:46:43Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:599065|Undeploy InterwikiSorting - II: Drop loading ability (T253764)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:48:55Z] <ladsgroup@deploy2002> jforrester, ladsgroup: Backport for [[gerrit:599065|Undeploy InterwikiSorting - II: Drop loading ability (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:54:35Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:599065|Undeploy InterwikiSorting - II: Drop loading ability (T253764)]] (duration: 07m 52s)

Change #599066 merged by jenkins-bot:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - III: Drop InterwikiSortOrders.php

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

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:57:28Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:599066|Undeploy InterwikiSorting - III: Drop InterwikiSortOrders.php (T253764)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-17T17:59:39Z] <ladsgroup@deploy2002> ladsgroup, jforrester: Backport for [[gerrit:599066|Undeploy InterwikiSorting - III: Drop InterwikiSortOrders.php (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:04:39Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:599066|Undeploy InterwikiSorting - III: Drop InterwikiSortOrders.php (T253764)]] (duration: 07m 10s)

Change #599067 merged by jenkins-bot:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - IV: Drop all config

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

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:13:23Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:599067|Undeploy InterwikiSorting - IV: Drop all config (T253764)]]

Tomorrow I will move around the config for InterwikiSortingSortPrepend so we can get rid of the ULS b/c code.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:15:34Z] <ladsgroup@deploy2002> ladsgroup, jforrester: Backport for [[gerrit:599067|Undeploy InterwikiSorting - IV: Drop all config (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:21:20Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:599067|Undeploy InterwikiSorting - IV: Drop all config (T253764)]] (duration: 07m 57s)

Change #599068 merged by jenkins-bot:

[operations/mediawiki-config@master] Undeploy InterwikiSorting - V: Stop loading i18n

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

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:31:39Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:599068|Undeploy InterwikiSorting - V: Stop loading i18n (T253764)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-17T18:57:46Z] <ladsgroup@deploy2002> jforrester, ladsgroup: Backport for [[gerrit:599068|Undeploy InterwikiSorting - V: Stop loading i18n (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-17T19:12:55Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:599068|Undeploy InterwikiSorting - V: Stop loading i18n (T253764)]] (duration: 41m 15s)

Hello @Ladsgroup , I did some reading on this extension and I'd like to know who this update is targeting. Is it the technical contributors? Or editors? Also please see if this captures the impact of this change:

"Users will no longer be able to customize the order of interwiki links in sidebars, as the InterwikiSorting extension has been un-deployed. Interwiki links will now appear in a non-compact (full) format and be sorted strictly by language code. This simplifies link presentation and ensures a consistent ordering experience across wikis."

Links: https://meta.wikimedia.org/wiki/Interwiki_sorting_order and https://www.mediawiki.org/wiki/Extension:InterwikiSorting

Entry for tech news: InterwikiSorting extension has been undeployed and non-compact version of interwiki links will be ordered by their language code instead.

Edit mercilessly

Hi, it's a bit different. We are not forcing non-compact (full format). The difference is that for people who enabled in non-compact mode (which is not the default), the ordering will be based on language code from now on.

Change #1240389 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@master] OutputPage: Sort language links before injecting to skin

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

Change #1240389 merged by jenkins-bot:

[mediawiki/core@master] OutputPage: Sort language links before storing them

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

I don't know if it has to do with this ticket, but now in themes Monobook and old Vector, the language list is sorted randomly. For example, on this page https://uk.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D1%80%D0%BE%D0%BF%D0%BE%D0%BB%D1%96%D1%82%D0%B5%D0%BD English is below Korean (first image), but on page https://uk.wikipedia.org/wiki/%D0%9C%D1%96%D1%81%D1%82%D0%BE it is below Hebrew at the bottom of the list, and Korean is higher up in the list (second image). This problem is also reported in ruwiki here: https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A4%D0%BE%D1%80%D1%83%D0%BC/%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9#%D0%A1%D0%BE%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0%20%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%B2%D0%B8%D0%BA

image.png (293×167 px, 13 KB)

image.png (241×167 px, 11 KB)

Was there a community consultation about removing it? Fwiw there are tonnes of unmaintained extensions deployed that do have a lot of bugs and feature requests open, what is a reason to touch one that does not really require any maintenance at all?

I don't know if it has to do with this ticket, but now in themes Monobook and old Vector, the language list is sorted randomly. For example, on this page https://uk.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D1%80%D0%BE%D0%BF%D0%BE%D0%BB%D1%96%D1%82%D0%B5%D0%BD English is below Korean (first image), but on page https://uk.wikipedia.org/wiki/%D0%9C%D1%96%D1%81%D1%82%D0%BE it is below Hebrew at the bottom of the list, and Korean is higher up in the list (second image). This problem is also reported in ruwiki here: https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%A4%D0%BE%D1%80%D1%83%D0%BC/%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B9#%D0%A1%D0%BE%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0%20%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%B2%D0%B8%D0%BA

image.png (293×167 px, 13 KB)

image.png (241×167 px, 11 KB)

It also affects Timeless, which uses the same selector as the old Vector or Monobook.

what is a reason to touch one that does not really require any maintenance at all?

Because things add up. As you rightfully say, it is not zero maintenance.
IIRC we have about 3mio lines of code in production just related to MediaWiki. That's not sustainable.

@Ladsgroup

Ok, how about this? "The InterwikiSorting extension, which enabled sorting of interwiki links, has been undeployed from Wikipedia. As a result, editors who had enabled interwiki link sorting in non-compact mode will now see links ordered by language code."

My follow up question will be what is the purpose of this change we have made? Create uniformity? Why is InterwikiSorter no longer needed?

Hi, it's a bit different. We are not forcing non-compact (full format). The difference is that for people who enabled in non-compact mode (which is not the default), the ordering will be based on language code from now on.

Change #1240706 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@wmf/1.46.0-wmf.16] OutputPage: Sort language links before storing them

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

Was there a community consultation about removing it? Fwiw there are tonnes of unmaintained extensions deployed that do have a lot of bugs and feature requests open, what is a reason to touch one that does not really require any maintenance at all?

On top of what Andre has said, who says it doesn't require maintenance at all? A simple example that I‌ gave above is that every time a new language is added (which is around once a month) someone should update InterwikiSortOrders.php and add the language code to several arrays based on the name of language in local language and other pieces. People usually forget to do that and the new language actually end up at the bottom of the list and/or a random place.

Change #1240707 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/core@wmf/1.46.0-wmf.15] OutputPage: Sort language links before storing them

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

Change #1240706 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.16] OutputPage: Sort language links before storing them

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

Change #1240707 merged by jenkins-bot:

[mediawiki/core@wmf/1.46.0-wmf.15] OutputPage: Sort language links before storing them

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

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:53:20Z] <ladsgroup@deploy2002> Started scap sync-world: Backport for [[gerrit:1240706|OutputPage: Sort language links before storing them (T253764)]], [[gerrit:1240707|OutputPage: Sort language links before storing them (T253764)]]

Mentioned in SAL (#wikimedia-operations) [2026-02-19T14:55:42Z] <ladsgroup@deploy2002> ladsgroup: Backport for [[gerrit:1240706|OutputPage: Sort language links before storing them (T253764)]], [[gerrit:1240707|OutputPage: Sort language links before storing them (T253764)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-02-19T15:01:26Z] <ladsgroup@deploy2002> Finished scap sync-world: Backport for [[gerrit:1240706|OutputPage: Sort language links before storing them (T253764)]], [[gerrit:1240707|OutputPage: Sort language links before storing them (T253764)]] (duration: 08m 06s)

The issue of random order is now fixed. It should be based on language code now.

Ladsgroup claimed this task.

One of the main reasons many refused to use the new, broken ULS was precisely the ability to sort interwikis in the order they needed and found convenient. Removing the extension without providing a viable replacement was, predictably, not the best idea.

This feels like a dissatisfying ending to a feature that's been on Wikipedias in one form or another since 2004. I was surprised to see it gone so quickly but also I forgot that I turned off compact links years ago, so maybe sorting is irrelevant to most users. I get the tech debt rationale broadly, but T253764#11632202 doesn't feel convincing because it's just static data that seems like it should be straightforward to have auto-generated instead of manually maintained (then again, no one did that for 20+ years so...).

More broadly, when Wikidata took over managing interwiki links, this functionality was built into Wikibase and then later split out of Wikibase to simplify maintenance (and I think that was mostly true at the time). But I wonder if it had stayed in the mega Wikibase extension that would've kept it alive longer, and that would've been a better strategy to pursue.

I suppose T4867: Interwiki lists sort in phonetic, site-defined order should be declined now?

From my vague memories it was split out of wikibase at the point in time, the cognate extension was created to manage interlanguage links on wiktionary.
As the same interwoki storing code that was part of wikibase would not run on wiktionary for the sirelinks that cognate provided.
Hence the split.

One of the main reasons many refused to use the new, broken ULS was precisely the ability to sort interwikis in the order they needed and found convenient. Removing the extension without providing a viable replacement was, predictably, not the best idea.

But that's not the reason to keep two competing functionalities. If something is not supported in ULS. Push for the support to be added there not keeping an old system noone maintains or want to maintain.

This feels like a dissatisfying ending to a feature that's been on Wikipedias in one form or another since 2004. I was surprised to see it gone so quickly but also I forgot that I turned off compact links years ago, so maybe sorting is irrelevant to most users.

On top of that, the number of people who disabled compact links is quite low and it doesn't work with vector-2022 at all. So the actual number is really really low.

I get the tech debt rationale broadly, but T253764#11632202 doesn't feel convincing because it's just static data that seems like it should be straightforward to have auto-generated instead of manually maintained (then again, no one did that for 20+ years so...).

It's not as simple, for example, the order could be based on local language name so instead of German, it'd be Deutsch. So far, easy. But what about فارسی?

More broadly, when Wikidata took over managing interwiki links, this functionality was built into Wikibase and then later split out of Wikibase to simplify maintenance (and I think that was mostly true at the time). But I wonder if it had stayed in the mega Wikibase extension that would've kept it alive longer, and that would've been a better strategy to pursue.

I'd also argue we should disable barely used functionalities in wikibase too but that's not my call :)

I suppose T4867: Interwiki lists sort in phonetic, site-defined order should be declined now?

I do it.

One of the main reasons many refused to use the new, broken ULS was precisely the ability to sort interwikis in the order they needed and found convenient. Removing the extension without providing a viable replacement was, predictably, not the best idea.

But that's not the reason to keep two competing functionalities. If something is not supported in ULS. Push for the support to be added there not keeping an old system noone maintains or want to maintain.

Are you kidding me? You've been fixing Vector's major bugs for five years and still haven't fixed them. What new feature push are you talking about?

One of the main reasons many refused to use the new, broken ULS was precisely the ability to sort interwikis in the order they needed and found convenient. Removing the extension without providing a viable replacement was, predictably, not the best idea.

But that's not the reason to keep two competing functionalities. If something is not supported in ULS. Push for the support to be added there not keeping an old system noone maintains or want to maintain.

sounds like meta:Community Wishlist/W507 / T416512: Enable the user to 'pin' preferred languages (for switching language easily)