Skip Navigation

[Resolved] AJAX Filters known out WPML translations

This thread is resolved. Here is a description of the problem and solution.

Problem:
Views Custom Filters updated with AJAX are breaking the WPML translations.
When you filter, you will receive unexpected results in the wrong language (or no results)

Solution:
The setting in WPML to support this must be enabled:
WPML > Language filtering for AJAX operations

This support ticket is created 7 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Beda 7 years, 1 month ago.

Assisted by: Beda.

Author
Posts
#580741

I am trying to:
Show a list of a custom post type with taxonomy parameters.

Link to a page where the issue can be seen:
hidden link

I expected to see:
In Chrome, when I select a taxonomy to filter the results, the list is updated and I see the correct posts. This is not the situation, if I visit the site on Safari. The parameters are not working, the list will be empty and so all the parameters.

This site is using WPML and the custom post type and its taxonomies are all set to be able to translate. There is only data for the Hungarian language, so all other language, even the default language has no posts or taxonomies.

I guess, Safari wants to show the default language's posts and taxonomies, that's why it is empty. But when you load the page, you can see all the Hungarian posts, it is happening only, if you choose a parameter to filter the results.

This can be only seen in Safari, with Chrome, everything is working as expected.

Instead, I got:
In Safari, I got an empty list, when I select any taxonomy to filter the results.

#580767

I see the issue, but cannot replicate this locally, and it is a strange issue, as on Safari it seems the HTML is simply missing in the Loop.

Can you provide me a Site's Snapshot so I can take it a apart a little, to see what is the cause?
https://toolset.com/faq/provide-supporters-copy-site/

Can you recall when this started to happen?

You can try to use Toolset only and a native WordPress theme, but I do not think this will bring any solutions, there are no related JS errors or PHP errors as far I know, hence I do not think this is due to a conflict.

Please can you provide me the above asked details?

Thank you.

#581473

This is a problem with WPML.

The issue is not present when you disable WPML and visit the same results on the pendant "default" language.

The issue is only happening in Safari, I assume there is a problem with WPML, AJAX and Safari.
The setting in WPML to support this was also disabled:
Language filtering for AJAX operations

But, enabling it did not solve the issue in Safari.

I am asked my WPML colleagues for assistance, but they did not know about this issue.

I tried to replicate this locally and I was not able to.

In my setup, such a search works just fine in Safari as well.

I suggest to bring this up in the WPML forum as well, as this seems related to WPML in your case.

I will ask a developer to have a look at the staging site as well.

#581519

Hi Beda,

it seems, your suggested setting has resolved the issue. I have set the Language filtering for AJAX operations and cleared all server and browser cache. It is now working for me on both (Safari, Chrome) browsers. Thanks for the tip!

#581556

Great, thank you for letting me know.