#28327 closed defect (bug) (fixed)
Contributor users receive an upload error when attempting to set a Featured Image
Reported by: | rickybanister | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | ui, administration | Cc: |
Description
Contributors are not permitted to upload media, however they are still displayed the 'featured image' widget on post-new.php.
Furthermore, if they attempt to upload media in the media overlay their upload fails and displays an upload error
The featured image widget should be hidden from contributors. If the widget is removed, the upload error becomes irrelevant.
Attachments (2)
Change History (16)
#3
follow-up:
↓ 4
@
10 years ago
- Focuses ui administration added
- Keywords 2nd-opinion ux-feedback added
Wow. So if you're a contributor, you can't create a post with any media in it. That's a serious editorial workflow issue.
I think we should add 'upload_files' to the contributor role. Thoughts?
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
10 years ago
Replying to ericlewis:
Wow. So if you're a contributor, you can't create a post with any media in it. That's a serious editorial workflow issue.
I think we should add 'upload_files' to the contributor role. Thoughts?
I don't think we should add the upload_files
cap to the Contributor role.
A Contributor can delete and edit their own posts, and read. They don't have the capability to publish their own post - any post they create has to be submitted for review.
The Contributor role only has a minimum level of trust. If a contributor is trusted enough to allow them to upload files, then their role should be changed to Author by the site admin.
The post editor doesn't show the Add Media button to contributors, so the Featured Image meta box should be hidden from that role as well.
#5
in reply to:
↑ 4
@
10 years ago
- Keywords 2nd-opinion ux-feedback removed
Replying to kpdesign:
I don't think we should add the
upload_files
cap to the Contributor role.
I tend to agree with you after reading the discussion on #19834 (More Robust Capabilities for Attachments). I think this ticket is more or less a duplicate of that. However, as this cites a specific bug that needs to be fixed, let's leave this open and follow-up on the user capabilities discussion in that ticket.
#6
@
10 years ago
Upload error messages in the modal are not at all helpful. Another instance is failed video uploads. Even a tiny 3 second video upload will fail on most hosts. Our error messages are useless dead ends. We need to see these messages in the context of flows like this and make them relevant and useful.
#7
@
10 years ago
This prompted me to do a visual record as a contributor.
28327.diff removes the featured image meta box for contributors. Administrators still see the box and all seems well when setting a featured image. I did not test with other roles. Looks good. Other tickets to improve error messages for this flow and video upload flow would be great.
This ticket was mentioned in IRC in #wordpress-dev by rboren. View the logs.
10 years ago
#11
@
10 years ago
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 4.0
- Version changed from trunk to 2.9
So, contributors cannot upload new images by default, and cannot use existing images either, since wp_ajax_query_attachments() requires upload_files
capability.
28327.diff looks good to me.
#12
@
10 years ago
Since we don't show the Add Media button if the user cannot upload files, I guess there's no point in calling wp_enqueue_media()
either. See 28327.2.diff.
Additionally, media items that were previously uploaded by admin users do not load for contributors.
Contributors see the spinner, but no media ever loads.