Hello!
New installation of Open Atrium 1.0b8, psql 8.4.4. Otherwise, looks great!
* warning: pg_query(): Query failed: ERROR: column reference "nid" is ambiguous LINE 19: GROUP BY comments_cid, nid, og_ancestry_nid, spaces_node_ty... ^ in /var/www/atrium-1-0-beta8/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid, og_ancestry.nid AS og_ancestry_nid, spaces_node.type AS spaces_node_type, comments.cid AS comments_cid, node.title AS node_title, node_revisions.uid AS node_revisions_uid, comments.uid AS comments_uid, node.changed AS node_changed, node.created AS node_created, comments.timestamp AS atrium_activity_sort, history_user.timestamp AS history_user_timestamp FROM node node INNER JOIN comments comments ON node.nid = comments.nid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN node spaces_node ON node.nid = spaces_node.nid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.status <> 0) AND (node.type IN ('blog', 'book', 'event', 'casetracker_basic_case', 'casetracker_basic_project')) AND (comments.timestamp > (1283192427 - 2592000)) GROUP BY comments_cid, nid, og_ancestry_nid, spaces_node_type, node_title, node_revisions_uid, comments_uid, node_changed, node_created, atrium_activity_sort, history_user_timestamp UNION ALL (SELECT DISTINCT(node.nid) AS nid, FIRST(og_ancestry.nid) AS og_ancestry_nid, FIRST(spaces_node.type) AS spaces_node_type, FIRST(NULL) AS comments_cid, FIRST(node.title) AS node_title, FIRST(node_revisions.uid) AS node_revisions_uid, FIRST(NULL) AS comments_uid, FIRST(node.changed) AS node_changed, FIRST(node.created) AS node_created, FIRST(node.changed) AS atrium_activity_sort, FIRST(history_user.timestamp) AS history_user_timestamp FROM node node LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN node spaces_node ON node.nid = spaces_node.nid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.status <> 0) AND (node.type IN ('blog', 'book', 'event', 'casetracker_basic_case', 'casetracker_basic_project')) AND (node.changed > (1283192427 - 2592000)) GROUP BY nid ORDER BY atrium_activity_sort DESC ) ORDER BY atrium_activity_sort DESC ) AS count in /var/www/atrium-1-0-beta8/profiles/openatrium/modules/atrium_features/atrium_activity/atrium_activity.views.inc on line 186.
* warning: pg_query(): Query failed: ERROR: column reference "nid" is ambiguous LINE 19: GROUP BY comments_cid, nid, og_ancestry_nid, spaces_node_ty... ^ in /var/www/atrium-1-0-beta8/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT DISTINCT node.nid AS nid, og_ancestry.nid AS og_ancestry_nid, spaces_node.type AS spaces_node_type, comments.cid AS comments_cid, node.title AS node_title, node_revisions.uid AS node_revisions_uid, comments.uid AS comments_uid, node.changed AS node_changed, node.created AS node_created, comments.timestamp AS atrium_activity_sort, history_user.timestamp AS history_user_timestamp FROM node node INNER JOIN comments comments ON node.nid = comments.nid LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN node spaces_node ON node.nid = spaces_node.nid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.status <> 0) AND (node.type IN ('blog', 'book', 'event', 'casetracker_basic_case', 'casetracker_basic_project')) AND (comments.timestamp > (1283192427 - 2592000)) GROUP BY comments_cid, nid, og_ancestry_nid, spaces_node_type, node_title, node_revisions_uid, comments_uid, node_changed, node_created, atrium_activity_sort, history_user_timestamp UNION ALL (SELECT DISTINCT(node.nid) AS nid, FIRST(og_ancestry.nid) AS og_ancestry_nid, FIRST(spaces_node.type) AS spaces_node_type, FIRST(NULL) AS comments_cid, FIRST(node.title) AS node_title, FIRST(node_revisions.uid) AS node_revisions_uid, FIRST(NULL) AS comments_uid, FIRST(node.changed) AS node_changed, FIRST(node.created) AS node_created, FIRST(node.changed) AS atrium_activity_sort, FIRST(history_user.timestamp) AS history_user_timestamp FROM node node LEFT JOIN og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN node spaces_node ON node.nid = spaces_node.nid LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.status <> 0) AND (node.type IN ('blog', 'book', 'event', 'casetracker_basic_case', 'casetracker_basic_project')) AND (node.changed > (1283192427 - 2592000)) GROUP BY nid ORDER BY atrium_activity_sort DESC ) ORDER BY atrium_activity_sort DESC LIMIT 15 OFFSET 0 in /var/www/atrium-1-0-beta8/profiles/openatrium/modules/atrium_features/atrium_activity/atrium_activity.views.inc on line 186.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | views-506818-33.patch | 881 bytes | gueux |
| #10 | atrium_activity_views_union_pgsql.patch | 780 bytes | gueux |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
Anonymous (not verified) commentedAfter more testing, the above errors show up frequently in the dashboard, during creation of users, groups, content addition or editing. Upping priority as it makes OpenAtrium difficult to use.
Comment #3
redhatmatt commentedSame error.
Media Temple VPS.
MySQL database 5.0.22
PHP 5.2.6
I remember last time conflicts with certain modules with Open Atrium, and or the lack of some turned on/off. Will post if I find the answer.
**** Just noticed that person that posted originally is using Postgress, funny that mine is almost same exact error, which makes me think it's a module conflict.
Comment #4
summit commentedSubscribing, seeing same sort of error, see: http://drupal.org/node/931460
greetings, Martijn
Comment #5
hely.sousa commentedI am a newbie on Drupal therefore I still cannot fix the problem by myself, although I think I have one possible solution, which is replacing nid by node.nid on
... GROUP BY nid ORDER BY .... Anyone knows where I could find those queries to fix them?Comment #6
hely.sousa commentedSorry, changing back the status to active.
Comment #7
danielbeeke2 commentedhey,
if you comment this line:
//$main = str_replace('ORDER BY', " UNION ALL ({$subquery}) ORDER BY ", $main);
it works
so the bug is in that line,.
Comment #8
thatoneguy commentedWow. This has been opened for over a year and it still occurs in the most recent version. Interestingly, the comment immediately above the line referenced in #7 is about a MySQL performance hack, which may or may not improve performance in PostgreSQL. As much as I'd like to use Open Atrium, these errors make it impossible for me to test this, let alone deploy it.
In any case, someone should really track down the actual errors. Somewhere, there are ambiguous references to
nidanduid. Unfortunately, I have no idea where they are.Comment #9
Gregoire Paccoud commentedHi,
I've discovered and installed openatrium 2 weeks ago, and working on its configuration since then. I'm having this issue too on a pgsql install. Makes "recent activity" and other activity blocks unusable.
Applied danielbeeke (#7) proposal but it only reduces the length of the error (see below). I'm looking for other patches, but there seems to be numerous similar issues and I'm lost (I don't know much about SQL). Anything new about it ? thanks...
• Before commenting the line :
*warning: pg_query() [function.pg-query]: Query failed: ERREUR: la référence à la colonne « nid » est ambigu LINE 19: GROUP BY comments_cid, nid, og_ancestry_nid, comments_subje... ^ in /includes/database.pgsql.inc on line 138.
*user warning: query: SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid, og_ancestry.nid AS og_ancestry_nid, comments.subject AS comments_subject, comments.cid AS comments_cid, comments.nid AS comments_nid, node.title AS node_title, node_revisions.uid AS node_revisions_uid, comments.uid AS comments_uid, node.changed AS node_changed, node.created AS node_created, comments.timestamp AS atrium_activity_sort, history_user.timestamp AS history_user_timestamp FROM oatest_node node INNER JOIN oatest_comments comments ON node.nid = comments.nid LEFT JOIN oatest_og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN oatest_node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN oatest_history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.promote <> 0) AND (node.status = 1) AND (comments.timestamp > (1353846018 - 2592000)) GROUP BY comments_cid, nid, og_ancestry_nid, comments_subject, comments_nid, node_title, node_revisions_uid, comments_uid, node_changed, node_created, atrium_activity_sort, history_user_timestamp UNION ALL (SELECT DISTINCT(node.nid) AS nid, FIRST(og_ancestry.nid) AS og_ancestry_nid, FIRST(NULL) AS comments_subject, FIRST(NULL) AS comments_cid, FIRST(NULL) AS comments_nid, FIRST(node.title) AS node_title, FIRST(node_revisions.uid) AS node_revisions_uid, FIRST(NULL) AS comments_uid, FIRST(node.changed) AS node_changed, FIRST(node.created) AS node_created, FIRST(node.changed) AS atrium_activity_sort, FIRST(history_user.timestamp) AS history_user_timestamp FROM oatest_node node LEFT JOIN oatest_og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN oatest_node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN oatest_history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.promote <> 0) AND (node.status = 1) AND (node.changed > (1353846018 - 2592000)) GROUP BY nid ORDER BY atrium_activity_sort DESC ) ORDER BY atrium_activity_sort DESC ) AS count in profiles/openatrium/modules/atrium_features/atrium_activity/atrium_activity.views.inc on line 186.
• after commenting the line :
*warning: pg_query() [function.pg-query]: Query failed: ERREUR: la référence à la colonne « nid » est ambigu LINE 19: GROUP BY comments_cid, nid, og_ancestry_nid, comments_subje... ^ in includes/database.pgsql.inc on line 138.
*user warning: query: SELECT COUNT(*) FROM (SELECT DISTINCT node.nid AS nid, og_ancestry.nid AS og_ancestry_nid, comments.subject AS comments_subject, comments.cid AS comments_cid, comments.nid AS comments_nid, node.title AS node_title, node_revisions.uid AS node_revisions_uid, comments.uid AS comments_uid, node.changed AS node_changed, node.created AS node_created, comments.timestamp AS atrium_activity_sort, history_user.timestamp AS history_user_timestamp FROM oatest_node node INNER JOIN oatest_comments comments ON node.nid = comments.nid LEFT JOIN oatest_og_ancestry og_ancestry ON node.nid = og_ancestry.nid LEFT JOIN oatest_node_revisions node_revisions ON node.vid = node_revisions.vid LEFT JOIN oatest_history history_user ON node.nid = history_user.nid AND history_user.uid = 1 WHERE (node.promote <> 0) AND (node.status = 1) AND (comments.timestamp > (1353846138 - 2592000)) GROUP BY comments_cid, nid, og_ancestry_nid, comments_subject, comments_nid, node_title, node_revisions_uid, comments_uid, node_changed, node_created, atrium_activity_sort, history_user_timestamp ORDER BY atrium_activity_sort DESC ) AS count in profiles/openatrium/modules/atrium_features/atrium_activity/atrium_activity.views.inc on line 186.
Comment #10
gueux commentedThey are two bugs in openatrium:
- #7 solves the union issue (atrium_activity_views_union_pgsql.patch)
- views-506818-33.patch (updated patch for the version of views found in profiles/openatrium/modules/contrib/views) solves an issue with groupby: see https://drupal.org/node/506818
Comment #11
mpotter commentedClosing old D6 issues.