user warning: Column 'nid' in field list is ambiguous query: SELECT DISTINCT nid FROM content_type_gallery_image 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 = 117 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 3 AND na.realm = 'content_access_rid'))) AND ( field_gallery_nid = '253') in /home/xxx/public_html/sites/all/modules/gallery_archive/gallery_archive.pages.inc on line 52.
All works fine as administrator User 1 but get error above logged in as any other user with any other role after clicking on the' Download Gallery' tab.

Comments

geerlingguy’s picture

It seems there may be some sort of problem when trying to access the fields when Node Access (I'm assuming that's the module, or something like that) takes over field display permissions.

Are you sure you have node access granting other users the ability to view your image field?

It's been quite a while since last time I've worked on this module... I'll try to take a glance at it soon, but I can't give promises. I've been intending to do a major rewrite for Drupal 7 anyways, and sooner is always better than later :)

carlodimartino’s picture

Yes. Pretty sure my permissions are correct as users can view the images. It's just when the "Download Gallery" tab is clicked that the error occurs.

geerlingguy’s picture

Status: Active » Closed (cannot reproduce)

I'm still not able to replicate this on either the live site on which I'm using this module, or on a local test environment. It seems like one of the access modules you may be using on your site is blocking access or configured incorrectly; the only access check this module does, really, is to check if the user has permission to download gallery archives (user_access('download gallery archive')). Marking 'cannot reproduce' for now. Please re-open if you can find anything more that would help me troubleshoot this issue.

One thing you could do to test is to disable and uninstall any access control modules, flush all caches, and try downloading the gallery as a different user.

geerlingguy’s picture

Issue summary: View changes

Additional information