Closed (fixed)
Project:
Node Gallery
Version:
6.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2010 at 21:57 UTC
Updated:
5 Nov 2010 at 09:56 UTC
Using:
Drupal: 6.16
Mysql: 5.0.27
Php: 5.2.6
Default language: Dutch.
Having the following error on every page where an image is being called
(so it refer to line 136 or 139 of file "node_gallery.inc". I've shortened the code to 1 message because it gets repeated.)
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT COUNT(*) FROM drupal_node n INNER JOIN drupal_node_revisions nr ON n.vid = nr.vid INNER JOIN drupal_node_galleries ng ON n.nid = ng.nid INNER JOIN drupal_files f ON ng.fid = f.fid WHERE n.nid IN (SELECT g.nid FROM drupal_node_galleries g INNER JOIN drupal_node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'acl') OR (na.gid = 2 AND na.realm = 'acl') OR (na.gid = 0 AND na.realm = 'og_public') OR (na.gid = 554 AND na.realm = 'og_subscriber') OR (na.gid = 1085 AND na.realm = 'og_subscriber') OR (na.gid = 561 AND na.realm = 'og_subscriber') OR (na.gid = 625 AND na.realm = 'og_admin') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 4 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access'))) AND ( g.gid = 1327) AND n.status = 1 ) in /var/www/vhosts/mysite.nl/httpdocs/sites/all/modules/node_gallery/node_gallery.inc on line 136.
Searching around lead me to http://drupal.org/node/78699 .
But I'm not using i18n and the () trick didn't work.
But at this page: http://drupal.org/node/224645
It showed a fix by removing the "db_rewrite_sql" part.
It did fix the problem (applying it to line 136 and 139), but not sure if it really is fix.
Therefore posting it over here (as I couldn't find other topics with this "node_gallery" matter.)
Comments
Comment #1
justintime commentedWhat node access module(s) are you running? I can't for the life of me see what the problem is here, I wonder if it's in one of your other modules.
Comment #2
Arjean-1 commentedThe site is currently using:
- ACL 6-1.2
- Forum Acces 6-1.3
- Organic Groups, access control 6-2.1
- The node_gallery lightbox2 is disabled.
No fancy settings just allowing people to view a node_gallery for now (to make it work for now)
You let me notice that an Admin doesn't get any errors when viewing the same pages.
Wierd I missed that last time.
(As a normal user/or unregistered) I don't get any error on the "site.com/galleries/" path even though the gallery image is showing there.
When clicking on the image it showes me the error, and telling me there are currently no images (even though there are)
Seems yesterday was late, the error is not that large, so here is the rest. Don't know why I splitted it yesterday.
I will continue trying some different user permissions/settings. Maybe I'm missing something.
Comment #3
justintime commentedAt what point did this break? I thought it was something new in the beta release, but that query hasn't changed between alpha 12 and beta 1. Did you install/upgrade an access module, or upgrade Drupal core?
Comment #4
dddave commentedAny news?
Comment #5
dddave commented... no news.