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.
- post_id This is the absolute ID of a post in the entirety of discourse.
- 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.
- 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.