Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Post History

66%
+2 −0
Q&A Answers order is changed when we access a specific answer by its direct link

I'm not sure how intentional it is, but it's a known change to fix a related bug. Until recently, if you followed a direct link to an answer that wasn't on the first page of the post, that action ...

posted 3y ago by Monica Cellio‭

Answer
#1: Initial revision by user avatar Monica Cellio‭ · 2021-08-12T13:37:51Z (over 3 years ago)
I'm not sure how *intentional* it is, but it's a known change to fix a related bug.  Until recently, if you followed a direct link to an answer that wasn't on the first page of the post, that action failed and you got redirected to the question instead.  I'm not sure of all the details, but apparently doing the right thing -- jumping to that answer on page N of the question -- is hard.  To make direct links useful, the solution was to move the target answer to the top and then jump to it.  If there is a better way to solve this problem and link to the answer where it normally falls (without breaking existing URL routes), we're interested in learning about it.  The [discussion on the issue that led to this change](https://github.com/codidact/qpixel/issues/518) might be useful context.

I hadn't noticed, though it makes sense now that you point it out, that this relocation happens in *all* cases, not just cases where there are multiple pages.  I wonder if we can do this only where answer count is higher than the page limit.  Determining what page an answer is on is hard, but detecting whether there are going to be multiple pages might be easier.  (I should clarify that I have only a theoretical understanding of the code involved.)