Closed (duplicate)
Project:
Drupal core
Component:
tracker.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jan 2005 at 21:59 UTC
Updated:
16 Mar 2005 at 04:48 UTC
I just upgraded a small site (not yet in active use; only 6 nodes) from 4.4.2 to 4.5.2. Following upgrade, "recent posts" produces a table with zero nodes (whether logged in or not).
My investigation shows that the following query (line 70, tracker.module,v 1.100.2.1) generates zero results, because "c.status = 0" is never true (there are no comments, so c.status is null, I think). I removed "c.status" from this database query, and "recent posts" produces the list of nodes that I expected. Since this site does not allow comments, this works for me.
$result = pager_query('SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, MAX(GREATEST(n.changed, c.timestamp)) AS last_post FROM {node} n '. node_access_join_\sql() .' LEFT JOIN {comments} c ON n.nid = c.nid INNER JOIN {users} u ON n.uid = u.uid WHERE n.status = 1 AND c.status = 0 AND '. node_access_where_sql() .' AND (n.uid = %d OR c.ui\d = %d) GROUP BY n.nid, n.title, n.type, n.changed, n.uid, u.name ORDER BY last_post DESC', 25, 0, 'SELECT COUNT(DISTINCT(n.nid)) FROM {node} n '. node_access_join_sql() .' LEFT JO\IN {comments} c ON n.nid = c.nid WHERE n.status = 1 AND '. node_access_where_sql() .' AND (n.uid = %d OR c.uid = %d)', $uid, $uid);
Comments
Comment #1
mikemee commentedFwiw, I see this same problem with 4.5.2. Recent Posts doesn't show new pages unless I add a comment to the node and then it works as expected....
Comment #2
morbus iffI caused this bug with a last-minute update for 4.5.2. See http://drupal.org/node/15500 for a fix (comment 18), or wait for 4.6.