[wp-trac] [WordPress Trac] #13961: search query_vars bug when using search base
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 18 00:14:58 UTC 2010
#13961: search query_vars bug when using search base
--------------------------+-------------------------------------------------
Reporter: shidouhikari | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0.1
Component: General | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13961>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list