Access problem with image gallery

Events happening in the community are now at Drupal community events on www.drupal.org.
hallman's picture

Something is screwy with image gallery since I upgraded from Drupal 5 to 6. I only use image galleries on one site, huntresses.org, which is a family site. Anonymous users aren't supposed to see any content. I use front page to say that you have to register. When I upgraded from 5 to 6, the Images menu item started showing on huntresses.org for anonymous. It is the only item in the menu. Originally it let me click through the galleries and it would display the full images (the nodes). Now the images show in the galleries but the image nodes are no longer displayed. So I've made some progress.

I should point out --- this is not real important. No one was posting in the galleries but me. Everyone else just uses blog posts with attached images and I'm now using IMCE. So I can disable images and image_galleries. But I've been messing with this for a while and I don't understand what's wrong. I'm thinking about posting an issue.

Image gallery has been recently changed to use views. Version 6 is still beta.

I've been working through http://www.juliakm.com/drupal-permissions-issues-debugging-checklist
Permissions:
Image module: nothing checked for anonymous
node module:: access content not checked for anonymous
views: nothing checked for anonymous
Anonymous shouldn't see anything but the special front page.

At admin/settings/performance, I've cleared cache a few times. And I've cleared views cache at admin/build/views/tools a few times.
at admin/content/node-settings I've rebuilt permissions a few times.
I disabled and re-enabled image and image_galleries.

I upgraded from Image 6.x-1.0-beta1 to beta3, ran update.php, cleared caches again. I think that fixed the node access problem -- anonymous gets access denied when trying to view an image node, but you can work your way down through the galleries, seeing the smaller versions of the images.

Disabled images and image_galleries again. Cleared performance cache and views cache. Re-enabled images and image galleries.
Rebuilt permissions. [Rebuilding permissions screws up front page. I have to go back and reconfigure front page.]

There is a new module, http://drupal.org/project/image_gallery_access, but I think this is for controlling access so that users can view selected galleries. I'm afraid that if I install it the problem will get worse. I'd rather disable images and galleries. Well... I could try it. I took a backup of the database this afternoon.

I suspect something is wrong in the view, so I'm attaching a screen that shows the view.

AttachmentSize
image_gallery_view.doc137 KB

Comments

Debugging Images

JuliaKM's picture

I looked briefly and noticed that I could still access taxonomy terms as an anonymous user. For example, http://huntresses.org/image/tid/23. I just can't get to the actual photo pages, which are image nodes. My guess is that while your nodes are accurately restricted, the auto-generated taxonomy term listings are not restricted to anonymous users. However, I'm not sure that you can restrict access to specific taxonomies by role without using an additional module. You might want to check out Taxonomy Access Control. It looks like there's also a module called Image Gallery Access.

Also, in your view, it looks like you have Access set to "unrestricted."

Julia

Problem fixed, more or less...

hallman's picture

I had not noticed Access set to "unrestricted" in the view. Thank you!

I changed it to Authenticated users, but that didn't fix it. While changing the view, I saw "Note that users with "access all views" can see any view, regardless of role." so I checked that but Anonymous does not have permission. So I cleared performance and views caches. And I reset permissions. That was dumb because resetting permissions screws up my front_page settings and I had to reset them again. But something in there worked -- my guess is that clearing views cache did it. BUT... Then when I went to huntresses.org/images I got a message saying there are no galleries! Googled that and found http://drupal.org/node/207371 #29 -- Argument Taxonomy: Term ID
Action to take if argument is not present was set to Display empty text. So I changed that to Display all values and now have a photo gallery. BUT... all the photos are in one gallery. I previously had subgalleries. That's OK. I think I like the photos better all together.

So mark this as "problem solved" and thanks again for pointing out Access set to "unrestricted."

Judy Hallman

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: