Nice search, not compatible with different characters. #995

Closed
b0tm0de opened this Issue Feb 28, 2014 · 5 comments

Projects

None yet

2 participants

@b0tm0de

Wordpress core search working with "ö,ç,ş,ı,ğ,ü" it converting them to "o,c,s,i,g,u".
So i have a post named "Sütlaç" it is not working if i search it.
My blog adress www.gizlitarif.com, you can try to search "Sütlaç" post.
http://www.gizlitarif.com/search/search_term

Sorry for my bad English.

@Foxaii
Roots member

I'm not able to replicate this locally and we fixed similar issues previously. Have you tried disabling plugins?

You can disable nice-search in lib/config.php or you could use remove_accents on the redirect. The search works with the accents on the two installs I tried.

@b0tm0de

thank you Foxaii, im glad about your answer. Probably remove_accents will fix my problem, but please can u show me where can i add it?
$search_base = $wp_rewrite->search_base;
if (is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], "/{$search_base}/") === false) {
wp_redirect(home_url("/{$search_base}/" . urlencode(get_query_var('s'))));
exit();

@Foxaii
Roots member
wp_redirect(home_url("/{$search_base}/" . urlencode(remove_accents(get_query_var('s')))));
@b0tm0de

Thank you, problem solved partically.
I am glad to root theme developers.

@Foxaii
Roots member

You're welcome.

@Foxaii Foxaii closed this Mar 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment