Opened 14 years ago
Closed 14 years ago
#14927 closed defect (bug) (fixed)
Impossible to search for Images w/o Javascript
Reported by: | hakre | Owned by: | westi |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | critical | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
When Javascript is switched off (in trunk, or javascript on in 3.0.x) it's not possible to search images _only_ in Media.
It will search all media, not images only (as with javascript on on trunk, it will search only the current selection).
It's either a bug that it does not w/o javascript or it's a but that it does with javascript (as the button says "search media" and not "search images").
Browse /wp-admin/upload.php?post_mime_type=image
and use the search form there to reproduce.
Attachments (6)
Change History (35)
#4
@
14 years ago
I think the bug is the label. Expected behavior is to search media whether javascript is there or not. We don't have an advanced search in core yet, so if it half-snuck in at some point, the interaction model for it was never officially worked out.
#5
@
14 years ago
- Milestone changed from Awaiting Review to 3.1
- Severity changed from normal to critical
Searching without JavaScript is broken in general. Doesn't seem to have to do with the mime type.
These work: posts, pages, (ms) users, (ms) themes, (ms) plugins, sites.
These do not: media, comments, links.
#7
@
14 years ago
- Keywords commit added
Best solution, given the circumstances.
Ideally, the search input should have a separate <form> tag, but that would require duplicating a lot of hidden inputs.
#8
@
14 years ago
Does that affect the bulk action limits with regards to URI length? I believe that was a primary reason for moving to post.
#10
@
14 years ago
Why does this work? I imagine we have a GET check somewhere that should be REQUEST instead? We should fix the real bug here.
#12
@
14 years ago
- Keywords has-patch commit removed
This is broken in the case of links because the POST gets redirected by the code in link-manager.php:
} elseif ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) ); exit; }
#16
@
14 years ago
Hi, Just a quick question aside.
Whats the difference between a .patch file and a .diff file? And which should I use in which situation? Is it documented anywhere?
#17
@
14 years ago
No difference. Trac supports both for syntax highlighting, so it's personal preference. I use diff, but I used to use patch. I probably transitioned around the time I moved to Mac and got used to typing svn diff
on the command line. It's also one less character :-)
The extensions come from the linux commands, diff (to make a differences/patch file) and patch (used to apply a differences/patch file).
#18
@
14 years ago
I've tried putting a wp_die in the branch of code that is being changed.
And I can't trigger it at all.
#19
@
14 years ago
fix-no-js-please-everywhere-use-get.14927.diff
uses the get method for the media form, just like the other admin forms. So it keeps the searched term in the search input element value and says "searched for x."
Testing bulk action delete seems to work fine with patch applied and js disabled.
#20
follow-up:
↓ 21
@
14 years ago
OK, it was pointed out to me that we switched to POST to avoid overly long GET requests for bulk edit.
How about switching the search to a separate form, like the tags edit page?
#21
in reply to:
↑ 20
@
14 years ago
Replying to filosofo:
OK, it was pointed out to me that we switched to POST to avoid overly long GET requests for bulk edit.
How about switching the search to a separate form, like the tags edit page?
We should - but not for 3.1
#23
@
14 years ago
As I'm sure you know, this is inconsistent with edit.php et. al and the search field isn't populated with the current value.
#24
@
14 years ago
That fixes the search box population when no-js
Testing with something like
http://trunk.domain/wp-admin/upload.php?s=gif
And then searching for something else previously would populate the search box with the value from the url even though it wasn't being used anymore
#27
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
See 14927.show.search.results.text.patch
. The sentence is missing in the no-js version.
Scribu implemented mime-type filtered search for Ajax requests. See #14579.