WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 14 months ago

#19817 new defect (bug)

Media Uploader sticks at 'Crunching' for Subscriber Uploads — at Version 7

Reported by: walkinonwat3r Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.3.1
Component: Media Keywords: close
Focuses: Cc:

Description (last modified by SergeyBiryukov)

When I add the capability 'upload_files' to the user role 'subscriber', the media uploader will hang at the 'crunching' step for the subscriber. The file is still uploaded, but the step never proceeds to redirect the user to the friendly insert image screen. Occurs when uploading from Media > Add New, as well as from the editor-based uploader.

The administrator does not have this problem.

Tested on a fresh install of WP 3.3.1 with the Twenty Eleven theme. Problem occurs on other themes, as well.

The solution proposed here for a similar issue does not work: #19814

Change History (7)

comment:1 solarissmoke2 years ago

  • Keywords 2nd-opinion close added

That would be because you've given the subscriber permission to upload_files, but not to edit_posts, so that after it's uploaded they are not allowed to change any of the data associated with it (title, caption, description etc).

I'm inclined to suggest that this is how it should be - if you want subscribers to be able to upload attachments then you also need to give them permissions to edit them.

comment:2 follow-up: walkinonwat3r2 years ago

  • Cc me@… added

Thanks for getting back to me on this. Adding edit_posts does indeed allow you to move past the 'crunching' step. However, I don't think the edit_posts capability should be a dependency for media. Perhaps there should be an edit_media, edit_images(_videos, _audio, etc), or edit_attachments, as well as a delete_, capability instead?

I can see a couple of ways the current method is lacking:
1) Adding the edit_posts capability adds the 'Posts' item to the sidebar and allows the user to submit posts for review. This isn't horrible, but it definitely doesn't necessarily follow from wanting the user to be able to edit media.
2) What if you're using a custom post type with a custom capability type? (My situation) Or what if you just want the user to edit pages, not posts, but want them to be able to add media easily?
3) What if you have some sort of audit trail responsibility and can't have users deleting content they added?

Most of these issues can probably be hacked around, but posts and pages both have robust capability controls. Why shouldn't attachments mirror this?

comment:3 in reply to: ↑ 2 DrewAPicture2 years ago

  • Cc xoodrew@… added

Replying to walkinonwat3r:

Adding edit_posts does indeed allow you to move past the 'crunching' step. However, I don't think the edit_posts capability should be a dependency for media. Perhaps there should be an edit_media, edit_images(_videos, _audio, etc), or edit_attachments, as well as a delete_, capability instead?

Adding an edit_attachments cap would make good sense and I agree. Why is editing attachments tied to editing posts? The two are mutually exclusive.

Maybe you should create another ticket for the enhancement.

comment:5 DrewAPicture2 years ago

  • Cc xoodrew@… removed
  • Keywords 2nd-opinion removed

comment:6 SergeyBiryukov2 years ago

#20638 was closed as a duplicate.

comment:7 SergeyBiryukov14 months ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.