Page MenuHomePhabricator

www.wiktionary.org and other portals are redirecting searches to wikipedia
Closed, ResolvedPublicBUG REPORT

Description

When searching for entries at www.wiktionary.org, the results open in Wikipedia instead of Wiktionary. This does not occur when using the search for a specific language Wiktionary (e.g. en.wiktionary.org). I asked a few other Wiktionary users and it seems this issue is widespread.

Software version: 1.44.0-wmf.23 (70d5344)

Other information (browser name/version, screenshots, etc.): Tested on Safari (iOS) and Chrome (Windows and iOS)

Event Timeline

Here is a video of the bug sent to me by another user on Wiktionary, I can also record one myself, if that helps.

Change #1134984 had a related patch set uploaded (by Wargo; author: Wargo):

[operations/mediawiki-config@master] search-redirect: fix case-sensitivity of project name

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

Wargo renamed this task from www.wiktionary.org searches redirecting to wikipedia to www.wiktionary.org and other portals are redirecting searches to wikipedia.Apr 8 2025, 8:53 AM

Change #1136121 had a related patch set uploaded (by Tacsipacsi; author: Tacsipacsi):

[wikimedia/portals@master] Send correct family to search-redirect.php

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

Sorry, why? The redirection is fixed on my end.

Because it still doesn't work for me, and there are still several patches being reviewed to fix the issue, so a resolved closure is premature.

I actually don’t know how it could be fixed on your end, as nothing has changed yet – two approaches have been proposed (mine just a few minutes before you closed the task), but neither of them has been accepted by now.

Yeah, I'm a bit confused - I got the notification about the commit, and I checked if it was working, it was, and then it didn't a few minutes later.

On 7th April a change was effected(1), removing a necessary conversion via the strtolower function while implementing new functionality in the search-redirect.php(2).
The client sides of the various portals send their names with the lead character in uppercase ("Wiktionary", "Wikisource"), however, the "in_array" comparison of the search-redirect.php(2) needs a conversion of these to lowercase, or there will be no matches and always a default to wikipedia.

From the changelog(1) it appears that the author simply forgot to readd the conversion after implementing a new function.

(1)https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/39ade60039017a53776cc1291cc05e528862c1b6%5E%21/#F0
(2)https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/39ade60039017a53776cc1291cc05e528862c1b6/docroot/wwwportal/w/search-redirect.php

Yeah, I'm a bit confused - I got the notification about the commit, and I checked if it was working, it was, and then it didn't a few minutes later.

Maybe the automated tests temporarily make the patches under test live? That would be pretty bad, but I’m not 100% sure it’s not the case. It needs further exploration (but that would be out of scope of this task).

On 7th April a change was effected(1), removing a necessary conversion via the strtolower function while implementing new functionality in the search-redirect.php(2).
The client sides of the various portals send their names with the lead character in uppercase ("Wiktionary", "Wikisource"), however, the "in_array" comparison of the search-redirect.php(2) needs a conversion of these to lowercase, or there will be no matches and always a default to wikipedia.

From the changelog(1) it appears that the author simply forgot to readd the conversion after implementing a new function.

(1)https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/39ade60039017a53776cc1291cc05e528862c1b6%5E%21/#F0
(2)https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/39ade60039017a53776cc1291cc05e528862c1b6/docroot/wwwportal/w/search-redirect.php

Good point, thanks for looking this up! This means that it’s a Regression, so I’m fine with @Wargo's approach, which reverts the faulty change.

Change #1134984 merged by jenkins-bot:

[operations/mediawiki-config@master] search-redirect: fix case-sensitivity of project name

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

Mentioned in SAL (#wikimedia-operations) [2025-04-16T13:06:00Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1134984|search-redirect: fix case-sensitivity of project name (T391297)]]

Mentioned in SAL (#wikimedia-operations) [2025-04-16T13:16:59Z] <lucaswerkmeister-wmde@deploy1003> wargo, lucaswerkmeister-wmde: Backport for [[gerrit:1134984|search-redirect: fix case-sensitivity of project name (T391297)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-04-16T13:28:56Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1134984|search-redirect: fix case-sensitivity of project name (T391297)]] (duration: 22m 55s)

TTO subscribed.

@Wargo's regression fix has been deployed.

Change #1136121 merged by jenkins-bot:

[wikimedia/portals@master] Send correct family to search-redirect.php

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