Opened 13 years ago
Closed 12 years ago
#26587 closed defect (bug) (fixed)
wp.media library argument post__not_in breaks the uploads
| Reported by: | ciantic | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Media | Version: | 3.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | javascript |
Description
- Open any page with media uploader, type in JavaScript console:
wp.media({library : { post__not_in : [123]}}).open()
- Then try to upload a file.
Notice that the Select file button does not work, new uploads does not show the progress bar nor the item being uploaded in the attachment area.
However post__not_in itself works in wp_ajax_query_attachments correctly by filtering only given attachment ID's from the list.
Attachments (1)
Change History (6)
#1
@
13 years ago
- Focuses javascript added
- Keywords needs-patch added
- Milestone Awaiting Review → 3.9
#2
follow-up:
↓ 3
@
12 years ago
This bug is not related to the post__not_in property. Setting library to a JSON object containing any property except order or orderby results in this behavior.
#3
in reply to: ↑ 2
@
12 years ago
- Milestone 3.9 → Future Release
Replying to tlovett1:
This bug is not related to the
post__not_inproperty. Settinglibraryto a JSON object containing any property exceptorderororderbyresults in this behavior.
Sounds then like this is not a serious bug, but just incomplete API. Moving to future.
#4
@
12 years ago
- Keywords has-patch added; needs-patch removed
- Milestone Future Release → 4.1
26587.diff allows you to pass include and exclude to Query.get(), which are aliases for post__in and post__not_in.
Example usage:
wp.media({frame: 'post', library: {include: [414, 415]}}).open()
wp.media({frame: 'post', library: {include: 414}}).open()
wp.media({frame: 'post', library: {exclude: [414, 415]}}).open()
wp.media({frame: 'post', library: {exclude: 414}}).open()
All of the parsed props are aliases, include and exclude are in line with what we do elsewhere.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Confirmed