8

When I look for the questions linked to #28867, the sidebar says there are 25 of them. But by my count there are only 14 on that page.

After Martijn Pieters suggested the discrepancy may be due to deleted posts, I looked up PostLinks table (which, unusually for SEDE, keeps track of deleted posts). There are 37 links to/from #28867 in the table, and 12 of them are to deleted posts. So, 37-12=25 is consistent with what the Linked sidebar shows. The reason this is incorrect is that some posts are linked twice: with LinkTypeId = 1 (ordinary link) and LinkTypeId = 3 (duplicate). The bug is that these are counted twice.

I tested this on links to #4708 with the same result: the sidebar says "37" instead of correct "27" because 10 questions have both kinds of links.

4
  • @MartijnPieters is most likely correct, couldn't find any other reference so this better be an answer and worst case a dev would step in and explain the real issue. – Shadow Wizard Wearing Mask V2 Oct 5 '14 at 8:07
  • @MartijnPieters There are indeed deleted posts, but they are excluded from the count: see the update. – user259867 Oct 5 '14 at 20:48
  • @CareBear: cool! Indeed, the links remain even when the target post has been deleted. – Martijn Pieters Oct 5 '14 at 20:49
  • Appears that the union which would de-duplicate the initial list of linked questions shoots itself in the foot by including link type so as to sort duplicates above other linked questions. Which is good behavior, but does break the count. – Shog9 Feb 8 '15 at 3:32

You must log in to answer this question.