Closed m3rg closed 8 years ago
Unable to reproduce. Posts are displayed in order of created_at, not updated_at, and only the latter is changed when editing a post.
I checked Models/Thread.php line 83 and I don't see any query ordering. I mean this part which is used displaying the posts of a thread:
public function posts()
{
$withTrashed = config('forum.preferences.display_trashed_posts') || Gate::allows('viewTrashedPosts');
$query = $this->hasMany(Post::class);
return $withTrashed ? $query->withTrashed() : $query;
}
Am I missing something? Because it's not sorting anything. I am using postgresql which is probably changing the internal order after an update. Do you think this might be the problem that you couldn't reproduce?
My mistake. You're right, there is no ordering, not even in the postsPaginated
attribute. I suspect you're right about postgres too. I'll think about where to apply the ordering since the posts relationship itself is used for retrieving the first and last posts of the thread as well, so I would rather leave that as is.
Fix included in new release.
Steps:
I think create date order should be preserved.