Page MenuHomePhabricator

missing project handler does not handle short-form URLs properly
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

You end up at https://incubator.wikimedia.org/wiki/Wy/cs/Wikivoyage:Hlavn%C3%AD_strana

What should have happened instead?:

You should have gotten to https://incubator.wikimedia.org/wiki/Wy/cs/Brno

I think in the past this did work correctly.

Permalink to a user's report: https://incubator.wikimedia.org/w/index.php?oldid=6202463#URL_redirection_broken_in_interwiki_links

Event Timeline

Pppery subscribed.

Tagging as Wikimedia-Site-requests as the code that does this is in https://github.com/wikimedia/operations-mediawiki-config/blob/master/multiversion/missing.php#L62. Probably a trivial fix but I have no idea how to set it up locally to test.

Probably fixing this will also fix T9496 - the root cause appears to be the same

Strange - https://cs.wikivoyage.org/w/index.php?title=Brno does work...

It looks like missing.php is trying to read $_SERVER['PATH_INFO'] to determine what path is being used, but not finding anything. Unfortunately I wasn't able to reproduce the issue locally, and have no idea how to test this further.

Pppery renamed this task from Link to non-existing projects get redirected to the Incubator project Main Page, instead of the specific page to missing project handler does not handle short-form URLs properly (was Link to non-existing projects get redirected to the Incubator project Main Page, instead of the specific page).Jun 4 2024, 4:41 AM
Pppery removed a project: incubator.wikimedia.org.

As does https://cs.wikivoyage.org/w/index.php/Brno so PATH_INFO is being set correctly in some circumstances.

Pppery renamed this task from missing project handler does not handle short-form URLs properly (was Link to non-existing projects get redirected to the Incubator project Main Page, instead of the specific page) to missing project handler does not handle short-form URLs properly.Jun 4 2024, 5:51 PM

I added Wikimedia-Apache-configuration since it seems like the problem is that something in Apache is causing https://github.com/wikimedia/operations-mediawiki-config/blob/master/multiversion/missing.php#L62 not to find the correct PATH_INFO parameter when given a short-form URL.

Change #1052165 had a related patch set uploaded (by Pppery; author: Pppery):

[operations/mediawiki-config@master] Missing.php: check REQUEST_URI in addition to PATH_INFO

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

Unfortunately fate had me write the patch for this one hour after the last backport window on Thursday so I given my current schedule I won't be able to schedule this for deployment until next Tuesday.

Change #1052165 merged by jenkins-bot:

[operations/mediawiki-config@master] Missing.php: check REQUEST_URI in addition to PATH_INFO

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

Mentioned in SAL (#wikimedia-operations) [2024-07-09T20:03:15Z] <urbanecm@deploy1002> Started scap sync-world: Backport for [[gerrit:1052165|Missing.php: check REQUEST_URI in addition to PATH_INFO (T9496 T355018)]]

Mentioned in SAL (#wikimedia-operations) [2024-07-09T20:07:21Z] <urbanecm@deploy1002> urbanecm, pppery: Backport for [[gerrit:1052165|Missing.php: check REQUEST_URI in addition to PATH_INFO (T9496 T355018)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-07-09T20:16:16Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:1052165|Missing.php: check REQUEST_URI in addition to PATH_INFO (T9496 T355018)]] (duration: 13m 01s)