How to Order Topic Replies in Chronological Order By Default

I recently migrated our forum from NodeBB to Discourse. It’s all going great so far, but I’m finding that all of the replies within each topic are automatically sorted in reverse chronological order (the latest reply is at the top, the oldest reply is at the bottom), which seems backward.

I’ve spent about 30 minutes trying to figure out how to show all topic replies in chronological order by default (oldest reply at the top, latest reply at the bottom), but I cannot find where to adjust this in the admin settings.

What am I missing? Where can I adjust how these replies are sorted?

1 Like

That’s strange, according to multiple topics here, that’s not even possible:

Are all new topics and posts doing this, or only ones from the import?

2 Likes

Good question.

Only the imported topics (which number in the thousands) have their replies sorted in reverse chronological order like this.

The few new ones created after the migration are being sorted chronologically, as they should be.

Is there any way to retroactively sort these imported topic replies chronologically?

2 Likes

I think there’s a rake task that might be of use:

rake posts:reorder_posts
4 Likes

They are displayed in the topic_id order. The problem, I’m guessing, is that somehow the nodeBB importer is getting the data in reverse cron and is therefore creating the posts in reverse order.

You need to see that the import script sorts the posts in chronological order when it does the import. (You’ll also need to wipe the whole database and do the import again).

Good one! Looks like that should work, though if it’s not too late, I’d recommend fixing the import script and starting anew.

2 Likes