Use node creation date when sorting by date and there are no replies

Created on 8 July 2009, over 15 years ago
Updated 4 May 2024, 8 months ago

Currently, if you select Date-descending sort in Forum settings, they actually sort by timestamp of most recent comment (or something like that). The result is that if you have a fair number of posts with no comments, the sort order appears to be random.

Actual date sort can be achieved by changing function _forum_get_topic_order() in forum.module.
Change l.last_comment_timestamp to n.created, so the final version looks like this:

case 1:
    return array('field' => 'n.created', 'sort' => 'desc');
    break;
  case 2:
    return array('field' => 'n.created', 'sort' => 'asc');
    break;

Otherwise, an even better idea would be to created-date sort option to the other sort options.

✨ Feature request
Status

Needs work

Version

2.0

Component

forum.module

Created by

πŸ‡ΊπŸ‡ΈUnited States aharown07

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024