Make WordPress Core

Opened 5 weeks ago

Last modified 3 weeks ago

#65806 new defect (bug)

Media Library Search Includes Extra URL Parameters Added After Search

Reported by: danielhudson Owned by:
Priority: normal Milestone: 7.2
Component: Media Version:
Severity: normal Keywords: has-patch has-test-info
Cc: Focuses:

Description

After using the media library search and the url parameter is set, if an additional parameter is set it doesn't parse just the "search" parameter and instead includes everything after "search=" ignoring any additional "&" and treating it like a string.

I would expect this to pick out just the search parameter to ensure the current search is persisted.

Change History (5)

This ticket was mentioned in PR #12839 on WordPress/wordpress-develop by @danielhudson.


5 weeks ago
#1

  • Keywords has-patch added

Rather than relying on the backbone route selected the search url parameter and passed that as the query

Trac ticket: https://core.trac.wordpress.org/ticket/65806

## Use of AI Tools

AI assistance: No

#2 @westonruter
4 weeks ago

  • Keywords reporter-feedback needs-test-info added

Thanks for the ticket and PR!

Could you share more information about how to reproduce this? Specific testing steps would be very helpful.

#3 @danielhudson
4 weeks ago

I found it while using the 'user-switching' plugin, when swapping back to my user after searching but it can be reproduced just by doing a search in the media section and manually appending an additional url parameter on it. While it normally wouldn't happen it's possible a user could end up with an additional url parameter and lose their search https://cleanshot.com/share/Z1lc3Chn

#4 @westonruter
4 weeks ago

  • Keywords has-test-info added; reporter-feedback needs-test-info removed
  • Milestone Awaiting Review7.2

This ticket was mentioned in Slack in #core-test by softglaze. View the logs.


3 weeks ago

Note: See TracTickets for help on using tickets.