Page MenuHomePhabricator

"Return to..." should link to the last page you were on in all cases
Closed, ResolvedPublic

Description

Author: mike.lifeguard+bugs

Description:
This used to be the case, IIRC, but is not currently. It may be since tonight's scap. Places where this message appears (after deleting, for example) the link always goes to [[Main Page]] and not the page you were last on, or the page you last performed an action on (deleting).


Version: 1.14.x
Severity: normal

Details

Reference
bz15451

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:18 PM
bzimport set Reference to bz15451.
bzimport added a subscriber: Unknown Object (MLST).

As I remember deletion never links back to the page. It links back to the main page instead because there is no page to link back to, you just deleted it...

mike.lifeguard+bugs wrote:

Yes, apparently this is not new behaviour. However, it doesn't make sense to me to link back to the main page after deleting something. Perhaps removing this altogether makes the most sense, but at a minimum, it should link to the last page visited as is done after logging in (you get a "return to [[wherever]]" that actually makes sense).

There are other instances, apart from deletion, when a link to Main Page is used; in some cases, a link back to the Special Page where the user came from is more appropriate (I don't have an example ready in my mind but they're easy to find). I once became interested in changing this behavior, but then noticed that the mechanism used to generate the link doesn't support a custom link in its current form. I believe this should be changed.

The only one I can recall now is after marking a page as patrolled; you expect to have a way to go back to "that" page, but (as of the last time I tested it) the link is to Main Page.

mike.lifeguard+bugs wrote:

(In reply to comment #5)

The only one I can recall now is after marking a page as patrolled; you expect
to have a way to go back to "that" page, but (as of the last time I tested it)
the link is to Main Page.

Actually it links back to [[Special:RecentChanges]] on wikis where all changes are patrolled, and back to [[Special:NewPages]] on wikis where only new pages are patrolled.

The ?title= parameter is specified in the URL, so clearly we know what page we were at - the link should be easily made.

mike.lifeguard+bugs wrote:

Updating summary... it does sometimes work (ie after you log in, it links to the correct page) and I don't know if it ever does link to [[Main Page]].

ayg wrote:

There are a number of instances of this.

0 17:51:11 /var/www/git-trunk/phase3$ git grep -n 'returnToMain([^,]*)' | cat
includes/Article.php:2386: $wgOut->returnToMain( false );
includes/OutputPage.php:1055: $this->returnToMain();
includes/OutputPage.php:1099: $this->returnToMain();
includes/OutputPage.php:1125: $this->returnToMain();
includes/specials/SpecialConfirmemail.php:138: $wgOut->returnToMain();
includes/specials/SpecialUserlogin.php:142: $wgOut->returnToMain( false );
includes/specials/SpecialUserlogin.php:733: $wgOut->returnToMain( null );
includes/specials/SpecialUserlogin.php:750: $wgOut->returnToMain( false );
includes/specials/SpecialUserlogin.php:777: $wgOut->returnToMain( false );
includes/specials/SpecialUserlogout.php:22: $wgOut->returnToMain();

A parameter should be provided for all of those where possible. This might require the use of extra returnto= parameters in some links so that it knows where to return to. Where appropriate, we might want to just redirect instead of printing the link.

Aklapper lowered the priority of this task from Medium to Low.Mar 25 2015, 4:07 PM
Ammarpad closed this task as Resolved.EditedDec 30 2019, 3:21 PM
Ammarpad removed a project: TestMe.
Ammarpad subscribed.

Resolved somewhen. If there's any remaining page that needs this, then a separate task would get better attention than this.