when i browse the XML feed of Buddies posts (usually http://www.domain.net/buddylist/1/buddies/recent/feed) and the error comes up
user warning: Unknown column 'n.nid' in 'field list' query: SELECT DISTINCT(n.nid) FROM node 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') OR (na.gid = 393 AND na.realm = 'og_subscriber') OR (na.gid = 202 AND na.realm = 'og_subscriber') OR (na.gid = 288 AND na.realm = 'og_subscriber'))) AND ( status = 1 AND uid IN (6,9,10,98,101,102,140,171,184,215,315,418) ) ORDER BY nid DESC in /home/domains/public_html/includes/database.mysql.inc on line 172.
Comments
Comment #1
dldege commentedBased on the query it looks like it might be related to node access rules being imposed by Organic Groups. You'll need to narrow it down a bit as the link seems to work fine without organic groups in my quick testing.
Comment #2
coldfly commentedyes
I tested it and found it will happen when og module is on
Comment #3
john morahan commentedThere's no 'n' alias for db_rewrite_sql to use. This would affect any node access module, not just OG.
Patch attached.
Comment #4
coldfly commentedthank you very much
this patch works
and the feed page gives the right content now
Comment #5
funana commentedHmmm. I patched the file but the buddy feed still doesnt show up (blank page, endless loading).
Any help appreciated!
Comment #6
john morahan commentedfunana, do you get any error message? (on the screen, on the next page, in your watchdog or apache logs)?
also, are you using any node access modules?
Comment #7
funana commentedNo errors on screen, next page or drupal logs (the xml page is loading endless, page does not return, stays blank). I don't have access to apache logs, sorry.
I have no node access modules installed.
Comment #8
funana commentedUpdate: I found out that it works, if a user just has one or two friends.
So maybe this is caused because of heavy loads?
Arent you just extracting the 25 last entries of buddies? Or are you extracting the last 25 entries of every buddy? That would be bad anyways.
Comment #9
Leeteq commentedSubscribing.