Last modified: 2013-04-22 16:16:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25222, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23222 - Should Special:UserLogout pass returnto parameters to Special:UserLogin?
Should Special:UserLogout pass returnto parameters to Special:UserLogin?
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 34429 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-17 10:27 UTC by Ilmari Karonen
Modified: 2013-04-22 16:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to let Special:UserLogout pass returnto parameters to Special:UserLogin (152.95 KB, patch)
2010-04-17 10:27 UTC, Ilmari Karonen
Details

Description Ilmari Karonen 2010-04-17 10:27:20 UTC
Created attachment 7300 [details]
Patch to let Special:UserLogout pass returnto parameters to Special:UserLogin

After a user has logged out and logged back in, it would be nice if the "return to" link on the login success page pointed to the page the user was on before logging out (rather than to the Main Page).

Steps to reproduce:
* Go to any page on the wiki (other than the Main Page).
* Click the "log out" link from the personal toolbar.
* Observe the convenient "return to" link back to the page you came from at the bottom of the page, but don't click it.  Instead, click the "log in again" link shown earlier on the page.
* Log in.
* Observe that the "return to" link on the page you see now is much less convenient, since it always points to the Main Page. 

This would actually seem quite easy to fix: Special:UserLogout just needs to pass any "returnto" (and "returntoquery") parameters it receives to Special:UserLogin.  This needs some technical fiddling with messages, since the existing "log in again" link is just an ordinary wikilink in the logouttext message, but it's not really very difficult.

In fact, I wrote the code to fix this (see attached patch) and tested it, but hit upon a snag: if Special:UserLogin receives a "returnto" parameter (and if no extensions like CentralAuth interfere) it will not show a success page at all, but will just redirect directly to the given page.  This seems to be a deliberate feature, and is probably useful if you're coming from a page that told you to log in first, but in this case it seems quite unexpected and probably undesirable.

So, instead of committing this, I'll just dump the diff here and ask what others think.  Would this be a useful feature at all?  If so, exactly how should it work?
Comment 1 Alexandre Emsenhuber [IAlex] 2012-10-06 12:52:36 UTC
Modified patch submitted in Gerrit change #26939.
Comment 2 Alexandre Emsenhuber [IAlex] 2012-10-07 05:49:28 UTC
And merged.
Comment 3 db [inactive,noenotif] 2013-02-10 13:38:37 UTC
*** Bug 34429 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links