Opened 12 years ago
Closed 11 years ago
#23317 closed defect (bug) (fixed)
Featured Image able to be set before image processed
Reported by: | bobbravo2 | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.6 | Priority: | normal |
Severity: | normal | Version: | 3.5.1 |
Component: | Media | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Steps to reproduce:
- Click set featured image
- Upload new (larger) file
- Click set featured image before the image has been resized.
The media modal show a blank square upon reopening the dialog: http://cl.ly/image/2h3R30432J2u
In addition, the featured image interface breaks until the page is reloaded. To confirm, after seeing the blank media box as pictured, try setting the featured image again.
Tested on 3.6-alpha-23334 with WP_DEBUG && SCRIPT_DEBUG set to true
Attachments (3)
Change History (12)
#1
@
12 years ago
- Cc koopersmith added
- Milestone changed from Awaiting Review to 3.5.2
- Version set to 3.5.1
#2
@
12 years ago
- Cc eric@… added
- Keywords needs-patch added
This is reproducible in 3.5.0-RC4. Selecting "Set featured image" before the image is processed/uploaded causes the Featured image modal to close, but the featured image is not set.
Upon re-opening the featured image selection, the original image is there, along with the blank square. It disappears when the page is refreshed.
#5
@
12 years ago
If any attachments within the current selection have not finished uploading, then the submit button will fail in both the "Insert Media" frame and the "Set Featured Image" media frame. The extra ghost attachment item is just a side-effect of the weird state you get by trying to set the featured image when the attachment's data isn't available.
After speaking with Helen, we feel it makes sense to disable the submit button if any image within the current selection has not yet finished uploading. This will prevent the unexpected behavior of clicking the "insert" button and seeing no action, as well as preventing the creation of the empty extra Attachment model.
CrazyJaco & I have a patch for this, attached above. We are using _.map to get a list of the uploading state of all models within the collection, then identifying whether any of those uploads are still in progress with _.some.
#6
@
12 years ago
- Keywords has-patch needs-testing added; needs-patch removed
Re-uploaded the patch to remove the call to _.map, as it was completely unneeded -- you can call .get('uploading') from directly within _.some()
@
12 years ago
Patch to prevent submission of media frame if any selected attachment is still uploading
#8
@
11 years ago
Just tested this against latest trunk—it merges cleanly and seems to still do its job.
Is this reproducible in 3.5.0? I am guessing not.