[Resolved] Problem with parametric search when I change language with wpml
This thread is resolved. Here is a description of the problem and solution.
Problem:
Parametric custom search filter language is not respected when WPML plugin is active
Solution:
You should enabled the checkbox at section "Language filtering for AJAX operations" and saved the setting from:
=> WPML => Languages
=> Section "Language filtering for AJAX operations"
=> make sure to checkmark the checkbox "Store a language cookie to support language filtering for AJAX" and saved the setting.
This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi, I setup a view with a taxonomy AJAX filter (country), then I added the view to a English page and to the Spanish translated page. I translated also all the entries (CPT Distributors) and the taxonomy terms.
The view is on /distributors/ and /es/distribuidores/ pages.
When I load the english version the filter works great, but when I go to the Spanish version and I select a country of the filter, it filters correctly the entries, but the view displays the english entries and filters terms on the dropdown. It is like it changes the view language to english. If I refresh the page (with the ?wpv-country=... parametres on the URL) it load correctly the Spanish version (both entries and filters terms).
I turned off the view cache (cache="off" on shortcode).
Hello. Thank you for contacting the Toolset support.
Well - It looks OK to me as I've tested.
I'm on non-English page:
=> hidden link
And I've filter with country = austria-es
And I see the result its displaying is PMM - to make sure its's displaying correct translated post - I've modified the field "Ciudad" in ES language and added "es" word to it.
=> hidden link
And when I see the result - its displaying the correct post. See the screenshot:
=> hidden link
Hi, the problem is still there. If I first go to /distributors/ (English version) everything works fine.
If I load /es/distribuidores/ it is still fine, I see all the spanish translations (Screenshot screen2-es.jpg).
But when I select a filter (/es/distribuidores/?wpv-country=espana&wpv_aux_current_post_id=656&wpv_view_count=646), it reload the view in english. On screen shot screen3-es.jpg you can see the text of the page is still spanish, but the filter terms are english. The loop result is also english and the filter is not set to the 'espana' parameter because now we have 'spain' not 'espana'.
If I refresh /es/distribuidores/?wpv-country=espana&wpv_aux_current_post_id=656&wpv_view_count=646 then It loads back spanish filters and entries.
Ok - I debug it further and I discover that if you are logged in and change the filter value - it works just fine but if you are NOT logged in and change the filter value - its not working.
I've reported this issue to our next level support, please hold on for further update.
I've enabled the checkbox at section "Language filtering for AJAX operations" and saved the setting from:
=> WPML => Languages => Language filtering for AJAX operations => checked the checkbox "Store a language cookie to support language filtering for AJAX" and saved the setting.