Page MenuHomePhabricator

[Regression] Log in "returnto" feature forgets query parameters if no title parameter was specified
Closed, ResolvedPublic

Description

I thought I recorded this bug already can't find it. This behavior was okay up until 1.18 and since 1.19wmf1 was deployed, it is breaking.

Steps to reproduce

  • Click Login in the top left and continue the login procedure

Expected

The "Back to ..." link should go to where I was

Actual

The link says "Main page" and goes to /wiki/Main_Page, no query at all.

I could understand if it assumes the title 'Main Page' if none was found in the originating url (although even that is somewhat unneeded, since MediaWiki knows the page title by the time the page is rendered, based on oldid and/or pageid). But instead of it becoming ?title=Some_page&originalquery or ?originalquery, it becomes /wiki/Main_Page.


Version: 1.19
Severity: normal

Details

Reference
bz36053

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:20 AM
bzimport set Reference to bz36053.
Krinkle created this task.Apr 18 2012, 1:05 AM
  • Bug 38251 has been marked as a duplicate of this bug. ***

There are two separate reasons this bug occurs. The first is that if no title is specified, then SkinTemplate::buildPersonalUrls() will not put any returntoquery, even if there is a query to return to. This is easily fixable.

The second issue is that LoginForm::successfulLogin() requires a returnto value in order to build the redirect URL. This is because it calls Title::getFullURL() on the returnto title. To get around this, there needs to be a way to build a full URL without having a valid title object.

no code yet, so pushing to future.

Change merged.

Aklapper removed a subscriber: Anomie.Fri, Oct 16, 5:41 PM