WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 5 weeks ago

#26587 new defect (bug)

wp.media library argument post__not_in breaks the uploads

Reported by: ciantic Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.8
Component: Media Keywords: needs-patch
Focuses: javascript Cc:

Description

  1. Open any page with media uploader, type in JavaScript console: wp.media({library : { post__not_in : [123]}}).open()
  1. 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.

Change History (3)

comment:1 wonderboymusic2 months ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.9

Confirmed

comment:2 follow-up: tlovett18 weeks 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.

Last edited 8 weeks ago by tlovett1 (previous) (diff)

comment:3 in reply to: ↑ 2 nacin5 weeks ago

  • Milestone changed from 3.9 to Future Release

Replying to tlovett1:

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.

Sounds then like this is not a serious bug, but just incomplete API. Moving to future.

Note: See TracTickets for help on using tickets.