#16335 closed defect (bug) (fixed)
Media Library search result sorting is broken
Reported by: | stephdau | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | major | Version: | 3.1 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
Under the current trunk (r17344), when going to /wp-admin/upload.php and submitting a search, the latter search query gets lost when trying to change the results' sort order.
- go to /wp-admin/upload.php
- submit a search, like the always popular "img_"
- once you have results, try to sort
- watch how the results are now unfiltered (but sorted right).
The issue is with _POST. _GET (/wp-admin/upload.php?s=img_) works as expected and is carried throughout.
Found while testing r17344 merge on wp.com.
Attachments (1)
Change History (16)
#3
@
14 years ago
- Severity changed from normal to major
Ah, of course it doesn't work. The link that you click to sort a column isn't updated to contain the search string.
#8
@
14 years ago
Plugins search form still has method="post"
, however there are no sortable columns now, so it's good.
#12
@
13 years ago
Did you seriously switch admin functions that can potentially pass up to several thousand bytes of data to GET via URL just avoid fixing the sort routine with POST?
That is just dumbfounding. It defies all "best practice" programming techniques not to mention the security issues it can create.
#13
@
13 years ago
Thanks for the helpful comment, _ck_. You're sure helping the project along.
If it's so awful, just fork it and make it conform to whatever best practices you want. Show us mortals how it's done.
#14
@
13 years ago
scribu do you feel it's appropriate to attack me personally in trac when I am commenting on the approach and not any individual? If you feel this change was appropriate then defend the change, don't attack me.
I don't claim to be an expert but that's my point - anyone with a base level of experience should have seen this is a bad move.
Don't take my "opinion" on it, go ask on Stack Overflow for some independent feedback on the wisdom of changing a form (in a legacy environment no less) that passes up to several Kbytes of data from POST to GET.
Let's forget about the security implications for a moment.
There are browsers still used today that won't accept urls over 2000 bytes.
Some proxies won't accept urls over 255 characters.
It's not just Media Library. Comments, Links and Users too.