Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | buddylist-db_rewrite_sql.patch | 1.02 KB | John Morahan |
Comments
Comment #1
dldege CreditAttribution: 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 CreditAttribution: coldfly commentedyes
I tested it and found it will happen when og module is on
Comment #3
John Morahan CreditAttribution: 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 CreditAttribution: coldfly commentedthank you very much
this patch works
and the feed page gives the right content now
Comment #5
funana CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Leeteq commentedSubscribing.