• Resolved dmjarvis

    (@dmjarvis)


    We are using your plugin to allow artists (via a custom post type) to manage the images that are attached to their post. This works really well (thank you!) except that we have noticed one thing….

    We had an artist who could not see any of their uploaded images in their gallery metabox when editing their post through the WP dashboard. We could see it when logging in as administrators though. At first, I thought this was because the author field for their media entries was left as blank, so I went through the media library and added the author to each of his images. However, I then looked at the plugin code and saw that it should display all images that are attached to the post (regardless of author) anyway. So I’m wondering if the problem is elsewhere… One line of thought I have is that the user role capability for the artist was somehow set so that ‘Upload Files’ was not a checked capability. To your knowledge, if the user role did not have this capability, would that stop the images from displaying in the gallery metabox?

    Thanks in advance.

    https://www.ads-software.com/extend/plugins/gallery-metabox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    There’s actually no checks for roles or capabilities in the plugin. It assumes that if you have access to view the “Edit Post” screen, you have sufficient privileges to view the attached images, so there’s no need for a check.

    Does the metabox show up and is empty, or does the metabox not show up at all? One issue could be that they’ve hidden the metabox in Screen Options. When logged in as that visitor, click “Screen Options” in the top right corner and ensure the gallery metabox is checked.

    Is the artist uploading the images from the Edit Post screen or the Media > Add New screen? They must use the former approach as that adds the current post as the “parent” of that image. If you just upload it in the standard media gallery (Media > Add New) it doesn’t have a parent and so is not listed in the gallery metabox.

    If neither of those solve the problem, I’d check to see if there’s any plugin or theme compatibility issues. Switch to the default theme and disable all other plugins to see if that fixes it. If it does, turn them on one by one to identify the culprit.

    Thread Starter dmjarvis

    (@dmjarvis)

    Thanks Bill.
    The images are uploaded initially by the artist via a registration form. This correctly attaches the image to the artist post, but does appear to leave the media author field blank. The artist can subsequently edit the images in their gallery by using this gallery metabox plugin.

    However, the artist doesn’t see this gallery metabox in their dashboard view until the media author field is correctly set to their username. My expectation was that in their gallery metabox they would see any images attached to their post, and that the author would be irrelevant.

    I think the gallery metabox appears in the dashboard, but showing no images until the media ‘author’ field is set. I’ll go back and confirm this later.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Upload_Files capability’ is closed to new replies.