My cron job and a couple of pages are giving error messages.
I've formatted it a bit so you can read the message. I'm fairly new to drupal, but the SQL looks wrong for 2 reasons
- it does look like b.weight should be in the select list
- i don't understand why we would need DISTINCT(n.nid) since nid is the PK for the node table
I've grepped through my drupal directory for several terms within the SQL statement and not found it at all, so I don't know how to go about fixing it.
Line 45 of the given file doesn't help, and I'm not sure how to get a stack trace.
Drupal 4.6.2, BTW.
Joe
warning:
pg_query():
Query failed:
ERROR:
for SELECT DISTINCT, ORDER BY expressions must appear in select list
in /home/joe/web/drupal-4.6.2/includes/database.pgsql.inc
on line 45.
user error:
query:
SELECT DISTINCT(n.nid), n.title
FROM node n
INNER JOIN node_access na ON na.nid = n.nid
INNER JOIN book b ON n.nid = b.nid
WHERE (na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','node_privacy_byrole_role1','node_privacy_byrole_user0'))
AND b.parent = 31
AND n.status = 1
AND n.moderate = 0
AND (b.weight < 0 OR (b.weight = 0 AND n.title < 'Freedom of Information Act'))
ORDER BY b.weight DESC, n.title DESC
in /home/joe/web/drupal-4.6.2/includes/database.pgsql.inc