search query_vars bug when using search base
|Reported by:||shidouhikari||Owned by:||markjaquith|
Use this debug code anywhere in a theme file:
global $wp_query; $search_string = $wp_query->query_vars['s']; echo "<p>$search_string</p>";
Then use a search form to do a normal search using more than a keyword, for exemple "search string", so that your testing site has posts that match it. It will result in something like http://domain.com/?s=search+string&submit=Go, debug will print "search string" and index.php will list all found posts as expected.
Now use search base version: http://domain.com/search/search+string ... debug prints "search+string" and since there's no post with "search-string", it is says there's no post matching.
I was unable to find where '+' should be but isn't replaced to ' ', and it's even more strange that only when search base is used that this bug happens.
Change History (36)
- Component changed from General to Query
- Keywords 3.2-early needs-patch added; reporter-feedback removed
- Milestone changed from Awaiting Review to Future Release
comment:13 in reply to: ↑ 9 SergeyBiryukov — 2 years ago
- Keywords 3.2-early removed
- Milestone changed from Future Release to 3.3
comment:25 markjaquith — 18 months ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
comment:27 follow-up: ↓ 28 nacin — 18 months ago
- Resolution fixed deleted
- Status changed from closed to reopened