Last modified: 2014-09-24 00:53:43 UTC
Steps to reproduce: 1) Choose some page and load its What links here special page. The list needs to be more than one page long (must show "next XY"). 2) Remove links/transclusions from all pages listed on that last WLH page. 3) Hit reload button. It will say "No pages link to ..." although there is at least one previous page full of links.
Can you provide a sample?
This must be a manifestation of the issue that whenever a bad "from" value is passed, you get the (empirically false) message that *no* pages link to the page in question. e.g. http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Main_page&from=99999999&back=254925 Don't know what the best solution would be. Probably "No more pages link to the current page. Click _here_ to return to the previous listing." where the link would be based on the "back" code.
Created attachment 8298 [details] Functional patch v1 The patch attached illustrates how I would go about ameliorating the situation (not commit-ready). In short, I would file scenarios as follows: $from set? | ------------------------------- | no | yes | | "no results found" (existing) | | $back set? -------------------------- | no (shouldn't happen) | yes | | "no more results (go back to start)" | | "no more results (go back a page)" The one outlined in this bug is yes-yes, which results in a helpful "back a page" link being presented to the user. That seems a reasonable resolution to my way of thinking. Not sure about supporting yes-no, it shouldn't happen unless you mess with the URL (I think!).
Looks good. I would make nomorelinkshere be "$1 You may wish to return to the [[:Special:Whatlinkshere/$2&from=$3&back=$3|previous page of listings]].", though. With $1 being wfMsg($errMsg); And as you probably know [[:Special:Whatlinkshere/$1&from=$2&back=$2 syntax doesn't work.
Jarry1250, did you have a chance to respond to Platonides's review? Adding the "reviewed" keyword.
Oh, I agreed with Platonides. I am happy to write a new patch, but since I don't have commit access anyways, the committer can also simply make the changes Platonides suggested (probably what I was thinking when I didn't reply 3 months ago).
We would also be happy to accept that patch from you :)
In which case, I shall put it on my (rather long) todo list :)
Created attachment 9684 [details] Version 2 of Patch I implemented the changes described in comment 4. Hope this helps.
(In reply to comment #8) > In which case, I shall put it on my (rather long) todo list :) Jarry1250, or now you can just commit it yourself? :)
Hmm, yes, probably could soonish.
(In reply to comment #9) > Created attachment 9684 [details] > Version 2 of Patch > > I implemented the changes described in comment 4. Hope this helps. Thanks, Chris! Can you grab developer access https://www.mediawiki.org/wiki/Developer_access and commit the patch into our source control system (after any updating to work with trunk)? Thanks!
"soonish" is such a vague term :P Thanks for the help Chris, I've turned your patch into a Gerrit changeset available for review: https://gerrit.wikimedia.org/r/37685 All comments welcome.
Patch in Gerrit needs rework - Jarry1250, do you plan to work on this (as you're set as assignee in this bug report?)
Change 37685 had a related patch set uploaded by Krinkle: (bug #20789) What links here pager falsely says "No pages link to" https://gerrit.wikimedia.org/r/37685
Change 37685 abandoned by Hashar: Whatlinkshere: Pager incorrectly shows "No pages link here" Reason: Abandoning per Siebrand. Feel free to reopen if there is any interest in finishing this. https://gerrit.wikimedia.org/r/37685