 yvesB-21
|
oh wow, the search fucntionality is not working at all for languages please check
|
 yvesB-21
|
redirected too many times
|
 yvesB-21
|
please fix this ASAP, one of our customer is complaining and i also checked and none of the languages for search is not working at all. today we only have 1 order, could it be it happened today?
|
 Nicolas V.
Supporter
Languages:
English (English )
French (Français )
Timezone:
America/Lima (GMT-05:00)
|
Hi Yves,
I had a quick look at your site since Alejandro finished his shift, and it seems the issue comes from the custom redirect_search_to_shop_page() function you’ve added in your functions.php file.
The problem appears to be that you’ve hardcoded /shop/ to check whether the user is already on the shop page. Since that URL is translated in your secondary languages, the condition fails and might causes a redirect loop.
While custom code falls outside the scope of our support, here are suggestions that might help resolve the issue:
1. Use Elementor's search widget
If your goal is to limit search results to products only, you could replace the older search form with Elementor’s Search Widget, where you can set the search type to "Products".
Ref: hidden link
2. Update your custom code
You could modify your function to retrieve the shop page URL instead of hardcoding it. Here's an example as proof of concept:
function redirect_search_to_shop_page() {
if ( is_search() && !is_admin() ) {
$shop_url = wc_get_page_permalink( 'shop' );
if ( strpos( $_SERVER['REQUEST_URI'], wp_make_link_relative( $shop_url ) ) === false ) {
$search_query = get_query_var('s');
wp_redirect( add_query_arg( 's', urlencode( $search_query ), $shop_url ) );
exit();
}
}
}
Ref: hidden link
|
 Nicolas V.
Supporter
Languages:
English (English )
French (Français )
Timezone:
America/Lima (GMT-05:00)
|
Another solution, or a quick test to verify that theory, would be to revert the translations back to "shop" in all languages.
- Go to "WooCommerce > WooCommerce Multilingual > Store URLs > Shop page" to edit them
|
 yvesB-21
|
great thanks! it was very strange because this code was added since we installed WPML, and the issue started today. I have removed the code and that fixed the issue!
|
 Alejandro
WPML Supporter since 02/2018
Languages:
English (English )
Spanish (Español )
Italian (Italiano )
Timezone:
Europe/Rome (GMT+02:00)
|
Can you try sending pages to translate? the ones you want / need? Try it out and let me know if it works correctly.
We made a few modifications to make sure that even big products, heavy products are translated correctly.
|
yvesB-21 |
Hello, we have started japanese.
there is something i wanted to ask or if that is something you can do? basically when someone orders, the customer notes on was usually all in english, but now what is happening is that if a customer uses for example dutch, the order note is all translated in the same language in which the customer ordered. can we have that in english?
|
 Alejandro
WPML Supporter since 02/2018
Languages:
English (English )
Spanish (Español )
Italian (Italiano )
Timezone:
Europe/Rome (GMT+02:00)
|
I split the ticket with the WooCommerce Question. We'll only handle the possible automatic translations issue for japanese in this case, ok?
I'll answer the other ticket in a few minutes.
Regards,
|
 yvesB-21
|
when ever i update elementor pro plugin then it gives this error
|
 Alejandro
WPML Supporter since 02/2018
Languages:
English (English )
Spanish (Español )
Italian (Italiano )
Timezone:
Europe/Rome (GMT+02:00)
|
what you see is not an error as you're thinking of, that process is actually coming from WordPress and it's trying to look for translations in a certain language, using the language code you added. if the language is not found in the WordPress Repo or in the Elementor's repo, then it will show that, because it will not find it.
It may be that hindi is using a different code on their end or that it doesn't exist altogether.
By the way, your site is still throwing a lot of background errors due to a few things:
- Flyingpress is creating a LOT of deadlocks in the database
- there is a "tasks" table that is causing a lot of bottlenecks and sometimes cuts the database communication
- You have a user log monitor whose table grew enourously and it's seriously slowing down some cronjobs
- Cronjobs are failing (I suspect due to the combination of issues mentioned above).
You may not see the site crashing, but it could be the reason why for example, in my case, i see plugins that say can't be downloaded yet it does download it in the end (it fails, it tries again and succeeds) or why in so many pages, whether WPML is enabled or not, i see so many JS errors (like a < was expected at the beginning of an HTML file, when it's actually there).
You may want to have those things checked out and maybe delete some user monitor log entries since it's over 100k last time i checked and that's really really big, considering that this log is ALWAYS logging something.
I also found some duplicate entries in the database, on our tables which were created because of the deadlocks from before (they were created at the same time) and I'll be helping you out with those ones because they will affect WPML in the future.
|