Make WordPress Core

Opened 4 years ago

Last modified 24 hours ago

#38221 assigned defect (bug)

Incorrect page id/name search blocks future searches

Reported by: bencroskery Owned by: tomdude
Milestone: 5.5 Priority: normal
Severity: normal Version: 4.4.2
Component: Media Keywords: good-first-bug has-patch
Focuses: javascript Cc:


After an incorrect page id or name search in the media library, ex upload.php?p=123 or upload.php?name=noexist, future searches get blocked in js.

Steps to reproduce:

  1. go to upload.php?p=123 (or use another id which doesn't exist)
  2. should see 'No media files found.'
  3. submit a search in the search box (nothing will happen)

Submitting the form is blocked by wp-admin/js/media.js:90, preventing the submit for (an unrelated?) search #find-posts.

Attachments (1)

38221.diff (672 bytes) - added by tomdude 3 years ago.

Download all attachments as: .zip

Change History (8)

This ticket was mentioned in Slack in #core-media by desrosj. View the logs.

3 years ago

#2 @desrosj
3 years ago

  • Keywords needs-patch good-first-bug added

Welcome to trac, @bencroskery! I was able to reproduce this, but it did take one change. This only happens in the list view in the media library, not the grid view. To reproduce, you must add mode=list to the URL.


Are you interested in tackling this @bencroskery?

3 years ago

#3 @tomdude
3 years ago

  • Keywords needs-patch removed

Created patch to fix this. Adds check if any posts exist for preventDefault conditional.

#4 @tomdude
3 years ago

  • Keywords has-patch added

#5 @DrewAPicture
3 years ago

  • Owner set to tomdude
  • Status changed from new to assigned

Assigning to mark the good-first-bug as "claimed".

This ticket was mentioned in Slack in #core by sergey. View the logs.

25 hours ago

#7 @SergeyBiryukov
24 hours ago

  • Milestone changed from Awaiting Review to 5.5
Note: See TracTickets for help on using tickets.