What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Very often, but not always, clicking the permalink of the 30th answer on some page (using whatever sorting), gets one to the page after that answer, where then obviously the #anchor of the linked answer does not exist. Hence, it seems like the link refers to the question instead of to an answer.

  • It happens for all three sorting methods, though testing for sorted by vote might be a bit difficult as people might cast a new vote during testing... (Testing with some old question might help, but now that I link to it, it might get some attention again... Just choose whatever sorting you like, then go to the 2nd page, and click the permalink of the last answer for that sort order. You'll get to the 3rd page, for all sorting methods.)

  • I figured maybe there's a difference whether or not an answer has been accepted, but it does not seem to matter.

  • Sometimes it only shows from page 2 and up. Maybe things are affected by deleted answers as well (which I cannot see, but the 10k's might see different behaviour)?

  • When a question has exactly 60, 90, 120, ... answers, one gets no answers at all for the very last permalink, like:

    No posts shown at all, just pagination

Of course, the issue is not about clicking the permalink shown beneath the answer itself, but following that very same URL from some other post, or from the activity notifications. Am I right to assume that, with 30 answers per page and 3 sorting methods, in a worst case scenario 1 out of 10 permalinks might not work for part of the audience?

(It feels a bit like "Random sorting appears to screw with answer permalinks" but that was caused by true random sorting, and is fixed.)

share|improve this question
    
See also "Permalink to answer not working (possibly because the answer is not on the first page)" at meta.stackexchange.com/questions/38424/… –  Arjan Feb 9 '10 at 11:09
add comment

2 Answers

up vote 4 down vote accepted

This has been fixed - it was totally my bad (all the way back from October 2008).

Part of the paging code was using the wrong answers collection; it was incorrectly using all answers, instead of filtering out deleted answers. This behavior would only appear on or near the page boundaries of questions with deleted answers - the more deleted answers, the wider range the bug could appear.

Thanks for finding and researching this! However, I'll not be able to eat today as punishment for introducing a bug ;-)

share|improve this answer
    
This will be pushed to all tiers tonight. –  Jarrod Dixon Feb 9 '10 at 12:21
add comment

This should not be affected by random ordering of answers with the same votes, since that is explicitly disabled once the # of answers exceeds the pagination limit.

Also, there has always been this limitation for deep linking when you select an alternate answer sort order, ever since the beginning -- probably a dupe.

edit: we currently suspect this has to do with deleted answers -- do you have 10k rep on the target site?

share|improve this answer
    
"random ordering of answers ... is explicitly disabled once the # of answers exceeds the pagination limit." - Whoa, I never noticed that, I'll have to tuck that useful bit of info away for later. –  Adam Davis Feb 3 '10 at 20:58
    
Just curious: what is the default sort order then? I did some more testing and it seems that each paginated question gives this problem for permalink of the last answer on each page, if sorted by oldest. (And I assume that SEO is not really affected, as search engines link to questions, not to specific answers?) –  Arjan Feb 3 '10 at 20:58
    
(@Pollyanna, see meta.stackexchange.com/questions/18655/… about that.) –  Arjan Feb 3 '10 at 20:59
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .