Skip Navigation

[Resolved] Split: Wrong language results returned with Views search after using language switcher

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

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#951333

OK. I removed all the custom code provided by BOTH you and Minesh.
The problem, as described, still exists.
So perhaps this is an issue with Views + WPML integration?

One curious point to note:
The problem only occurs when moving languages away from the WPML "default" language.
e.g. If we reverse the order;
1. Search on Japanese
2. Click on the "English" language switcher
3. Do another search
The results are correctly returned in English (the default lang.)

#952182

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Paul

I'm having problems reproducing the issue.

I have some content whose original language is English, with translations of each of the posts (in my case, to Spanish).

I created a View with a text search to search the post titles.

I inserted that View on an English page, and then translated the page, including the same View on the translated page.

In a different browser where I'm not logged in I visited the search page in English and performed a search. English results were shown.

I used the language switcher to swap to the second language.

The page updates and shows the unfiltered Spanish posts.

I perform a text search for the titles and Spanish posts are returned, as expected.

I noticed that you display the results on a different page from the initial search and modified my own set up accordingly, but still couldn't reproduce the problem.

I think I'll need to take a look at your site to see if I can identify the issue, and if needs be take a copy for further analysis.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes other than possibly to temporarily add a backup plugin to take a snapshot of the site.