When content is updated, I would expect it to become top of the list?
Only when I add a comment like "I updated this node" it comes on top.

Maybe that's how it supposed to be, but I find this odd.

Comments

friedchuckles’s picture

This can be easily fixed by changing the "last_post" in the sql query.

Change:
l.last_comment_timestamp AS last_post

To:
GREATEST(n.changed, l.last_comment_timestamp) AS last_post

Here's the complete query from version 5.x:
$sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) as last_post, l.comment_count ' . $score_column . ' FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid ' . $nv_join . 'LEFT JOIN {term_node} t ON t.nid = n.nid LEFT JOIN {comments} c ON n.nid = c.nid WHERE n.status = 1 ' . $sql_where . ' GROUP BY n.nid ';

ednique’s picture

Supurb!
dead easy and works great!

kbahey’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Status: Active » Fixed

Fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)