For staff, navigation by post number is off


#1

Before I get into the bug report, I’ll define the terms I am using, since I’m not sure what the terms used by the Discourse team are.

  1. post_id This is the absolute ID of a post in the entirety of discourse.
  2. post_number This is the id of a post within a topic, including its relation to deleted, moved, and hidden posts. This is number does not change.
  3. post_position This is the displayed position of the post within the context of its topic. This number can change.

For example, this post on WTDWTF has post_id = 416494, post_number = 259, and (at time of this writing) post_position = 255.

The problem is that when using the navigation control to go to a specific post, it is navigating by post_number instead of the expected post_position. So when using the navigation bar in the topic on WTDWTF linked above, the results depend on whether your target is before or after the posts which have been deleted from the topic.

For example, if you went to that topic and used the navigation control to go to post 150, you would end up at post_number = 150/post_position = 146 instead of the expected post_number = 154/post_position = 150.


#2

Further testing indicates that this may be a staff specific bug.


(Jeff Atwood) #3

That means it probably has to do with deleted posts, then.


#4

Yes, there are four deleted posts in the topic in question, all near post_number 60. Hence the noted difference between post_number and post_position.


#5

Any progress? Prioritization?