This is the only thing holding me up from actually launching my site. I get the following error when the site is viewed by an anonymous user. No ads are shown, just the error. Any help would be great. Thanks
Error:
Unknown column 'ads.nid' in 'where clause' query: SELECT ads.aid AS aid FROM ads ads LEFT JOIN node node ON ads.aid = node.nid LEFT JOIN term_node term_node ON node.nid = term_node.nid INNER JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN node_access na ON na.nid = ads.nid WHERE ((ads.nid IS NULL OR (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'user_relationship_node_access_author'))))) AND ( term_data.tid = 25 ) LIMIT 0, 10 in /xxxxx/modules/views/includes/view.inc on line 771.
Comments
Comment #1
glarsch commentedAs an update, to fix this error I had to give anonymous users the permission of "administer nodes" to get rid of this message and for them to be able to see the ads. When I take that permission away, they can't see the ads anymore. This is kind of a big issue for me. Any ideas on how to fix it? Let me know if you need more info.
PS. I did just upgrade to the newest dev version to see if that would fix it, but no go.
Thanks,
Grant
Comment #2
3dloco commentedHello Grant,
Did manage to resolve this other than dangerously allowing administer node permission to anonymous users?
I am currently having this same error...and this looks like it is a duplicate of #818582: Ads not visible to any role except administrator.
The query is looking for a column that does not exist...instead of ads.nid it should be ads.aid.
For me, this only occurs when I am using an ad inside a view so closing this out and marking as duplicate of the issue already open on the ad_views queue.
Regards,
KH