Resources

My Agape try

Your Agape try


Support Forum

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




Gallery Problem - Single Image View

UserPost

2:53 am
August 19, 2008


lxne

New Member

posts 2

1

Hi, I encountered a problem with the gallery-function of wordpress 2.6.1 and role scoper 0.9.27.

As admin everything works fine, but any other user can only see the thumbnail-overview of galleries. If they click on one of the thumbnails a new page without the expected image loads. WP won't display any gallery-images to non-admins. If I turn of rolescoper the galleries work flawless.

btw: Thank you for this great plugin!

5:01 pm
August 19, 2008


Kevin

Admin

posts 1326

2

I need to put some work into filtering attachments according to the user's role on the attachee post/page.  For now, you can disable RS attachment filtering by putting the following code at the top of query_interceptor_rs.php, function flt_objects_where:

        if ( strpos( $where, "post_type = 'attachment'" ) )
            return $where;

… or you can download and install the current development snapshot


9:49 pm
August 19, 2008


Kevin

Admin

posts 1326

3

Attachment filtering should now work properly in the development snapshot

I'm not ready to call this a release yet, but it has worked fine for one other user.  Also fixes several other minor bugs and adds the pending revisions feature, which I have not yet documented.

1:35 am
August 20, 2008


lxne

New Member

posts 2

4

Yeah, works like a charm.

Thank you very much!

7:31 pm
March 24, 2009


celemack

Member

posts 3

5

Hi there,

Sorry, this is my first time posting so I may miss some information I need to include - just let me know and I'll try to give the right information.

We're using role scoper on our library's public blog to manage external contributors and we've found it to be an amazing plugin - thank you for creating this Kevin, it was just what we needed!

We've run into a similar problem as the one described above, but with Wordpress 2.5.1 and role scoper 1.0.0-rc9.9216, and the fix given above doesn't work for us.

Here is our developer's summary of what we got when we tried to put this fix in place:

"This problem is similar to the one mentioned in this thread but the fix does not fix the problem
- it is asking to ignore the altering of the $where clause if the $where clause contains "path = 'attachment'" but the $where clause coming through when clicking on the thumbnails has "path = 'page'" and trying the fix with "path = 'page'" doesnot fix the problem either."

The problem has the same description as Ixne gives above - logged in admin users can see the single image view of images in a gallery, but other users can't.

Can anyone help with this?

(I'll just add as well that we're in New Zealand, so there may be a slight time lag in our response to any replies, but we'd be very grateful for any help anyone can give us Smile)

1:36 pm
March 27, 2009


Kevin

Admin

posts 1326

6

Thanks to your report, I've included a fix for this in Role Scoper 1.0.1

8:33 pm
March 29, 2009


celemack

Member

posts 3

7

Hi Kevin,

Thank you for looking at this!

We've installed 1.0.1 but we still have the same issue with non-admin users not being able to see full-size individual gallery images.

Is there anything else we could do?

2:26 pm
March 30, 2009


Kevin

Admin

posts 1326

8

Are these unattached uploads? For non-Administrator users, Role Scoper filters attachment access to match the user's edit access to the post it's attached to. I'm not sure if I can do that and grant access to unattached posts. If nothing else, I will want to take my time pursuing that feature so I don't break the current post-specific filtering scheme.

2:57 pm
March 30, 2009


celemack

Member

posts 3

9

Hi Kevin,

No - they're definitely images that were uploaded inside of posts using the image uploader.

You can see an example here -

http://www.wcl.govt.nz/blog/index.php/2009/03/23/some-more-pictures-from-newtown-event/

These images were uploaded inside of the post and then inserted as a gallery.

I don't know if it's relevant, but I've noticed that there's no problem viewing the fullsize image for a single image that's been inserted into a post -

http://www.wcl.govt.nz/blog/index.php/2009/03/24/creative-approach-to-cultural-acceptance/

Could this be something to do with the way our permalinks are set up? Everything still appears fine if you're logged in as an admin - it's only users with other roles or users who aren't logged in that get the 404 page.

3:40 pm
March 30, 2009


Kevin

Admin

posts 1326

10

Oh, I thought you meant that non-admin users couldn't edit an individual image from the wp-admin Media Library.

I'm very interested in tracking down your front-end image access issue. It would be interesting to know whether the behavior changes if you temporarily set your theme (potentially using a test site?) to WordPress default.

It's possible that (for your theme and site configuration) something is going wrong with the attachment_access() function in attachment-filters_rs.php. Possibly, the attached-to object type (post/page) is not correctly retrieved from the database.

If you can e-mail me an ftp login to the role-scoper folder, I'll diagnose and fix this tomorrow.



Reply to Topic: Gallery Problem - Single Image View

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 11 + 3        (Required)

Topic Reply:


 

About the Agapetry forum

Currently Online:

11 Guests

Maximum Online: 88

Forums:

Groups: 2

Forums: 7

Topics: 667

Posts: 3053

Members:

There are 601 members

There are 1 guests


Kevin has made 1326 posts

Top Posters:

metal450 - 98

YikYak - 58

Ragnar - 36

Daisy - 35

LorenW - 33

Administrator: Kevin | Moderators: Kevin