I am using Postgresql as my database backend, and am getting the following error when the RSS feed is being generated for anonymous users. I am using Organic Groups for other content but all bibliography entries are public and do not belong to a group.

warning: pg_query() [function.pg-query]: Query failed: ERROR: table name "na" specified more than once in /usr/local/www/drupal6/includes/database.pgsql.inc on line 139.
user warning: query: SELECT DISTINCT(n.nid), n.*, b.*, bt.name as biblio_type_name FROM (SELECT DISTINCT ON (nid) * FROM node) n left join biblio b on n.vid=b.vid inner join biblio_types bt on b.biblio_type=bt.tid INNER JOIN node_access na ON na.nid = n.nid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (n.type='biblio' ) AND (n.status = 1 ) ))ORDER BY b.biblio_year , b.biblio_date LIMIT 50 in /usr/local/www/drupal6/sites/all/modules/biblio/biblio.module on line 1720.

I am unable to reproduce this error for authenticated users.

Comments

rjerome’s picture

Hmm, the table "node_access" is being included twice...

INNER JOIN node_access na ON na.nid = n.nid INNER JOIN node_access na ON na.nid = n.nid

I'm not sure why but I don't think it's a biblio issue, perhaps a OG configuration issue?

GeoffGlasson’s picture

Thanks for the feedback. To be honest I've got no idea whether it's an OG issue or not because it only seems to be affecting Biblio but I agree that it doesn't mean that Biblio is at fault.

FWIW OG is current configured so that Biblio entries are not permitted to be posted to a group. I'll try configuring OG so that Biblio can be posted to a group and see what happens. Other than that I don't know what else to do. Any ideas?

liam morland’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.