Drupal 5 clean install, Xampp 1.5.2, Windows XP
With a clean install of Drupal 5 and three contributed modules installed in the following order: 1) modr8 v5.x-2.1; 2) views v5.x-1.5 (required by OG); and 3) OG v5.x-1.0. After activating the Live Discussion Block I receive the following error when logging in and out of user accounts:
Not unique table/alias: 'n' query: SELECT DISTINCT(c.nid), n.title, COUNT(c.nid) AS comment_count, MAX(c.timestamp) AS the_time FROM comments c LEFT JOIN node n ON n.nid = c.nid LEFT JOIN node n ON c.nid = n.nid INNER JOIN node_access na ON na.nid = c.nid WHERE ((n.moderate != 1 OR n.uid = 0)) AND (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( n.status = 1 AND c.status = 0 ) GROUP BY c.nid ORDER BY the_time DESC LIMIT 10 in C:\Internet\xampp\htdocs\drupal\includes\database.mysql.inc on line 167.
See this related issue also: http://drupal.org/node/111421
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ld_query_patch.patch | 1.96 KB | pwolanin |
| #1 | live_descussions.1.18.txt | 3.71 KB | Prometheus6 |
Comments
Comment #1
Prometheus6 commentedThe module creates a query on the comment table...when it calls db_rewrite, the module tells db_rewrite the indexed table's alias is 'c'...it looks like someone is hooking into the rewrite chain in some way that assumes the table alias will be 'n'.
At any rate, because of this suggestions
http://drupal.org/node/112429
I've updated the module such that this should go away. It's the HEAD version, and if you can handle diffs I've attached one.
Comment #2
pwolanin commentedtoday, doing a checkout on the DRUPAL-5 branch, there seemed to have some really wrong queries.
I used the attached patch to get it working (note the change to use db_query_range).
Comment #3
Prometheus6 commentedreleased the new version