Page MenuHomePhabricator

[S] Infinite redirect on Special:Contribute (mediawiki.org)
Closed, ResolvedPublic1 Estimated Story Points

Description

While logged-in with KHarlan_(WMF) I get an infinite redirect when attempt to visit Special:Contribute in Minerva (m subdomain) or on desktop (Vector 2022).

image.png (1×2 px, 399 KB)

Seemingly this is the problematic code in SpecialContribute.php:

$target = $par ?? $request->getVal( 'target', '' );

$titleLocalUrl = static::getTitleFor( 'Contribute', $this->getUser()->getName() )->getLocalUrl();
if ( $target !== $this->getUser()->getName() ) {
   $this->getOutput()->redirect( $titleLocalUrl );
}

QA

Go to https://m.mediawiki.org/wiki/Special:Contribute

QA Results - Prod

ACStatusDetails
1T320804#8343928

Event Timeline

The underscore/space in user name didn't get normalized, but why it needs to be redirected to the subpage with user name?

Change 842399 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] SpecialContribute: Avoid unnecessary redirects and optimise showing checks

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

Change 842399 merged by jenkins-bot:

[mediawiki/core@master] SpecialContribute: Avoid unnecessary redirects and optimise showing logics

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

LGoto set the point value for this task to 1.Oct 18 2022, 5:00 PM
LGoto renamed this task from Infinite redirect on Special:Contribute (mediawiki.org) to [S] Infinite redirect on Special:Contribute (mediawiki.org).Oct 18 2022, 5:06 PM
LGoto moved this task from Upcoming to QA on the Web-Team-Backlog (Kanbanana-2022-23-Q2) board.

Note: This patch didn't catch the train of 1.40/wmf.6, so it is not ready to QA in prod.

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: mediawiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Go to https://m.mediawiki.org/wiki/Special:Contribute. Confirm there are no infinite redirects. Repeat for Vector 2022.
Note I only tested this in Production. No redirects were present in the network tab of devtools.

Screen Recording 2022-10-25 at 3.21.53 PM.mov.gif (548×1 px, 324 KB)

Looks good, resolving!