Last modified: 2012-11-03 08:44:16 UTC
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).
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...
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.
What examples are there?
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.
(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.
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]].
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/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 );
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.