Skip Navigation

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

Problem:
The client's multilingual shop, with English as the primary language and Dutch as the secondary, was experiencing issues with language redirection during searches. Initially, searches in the Dutch version redirected to the English version. After clearing the cache and reoptimizing SEO data, the issue reversed: searches in the English shop redirected to the Dutch shop.
Solution:
It was caused by the option "Merge inline extra css and javascript" in wp-optimize.

If this solution does not resolve the issue or seems irrelevant due to updates or different circumstances, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Additionally, if the problem persists, please open a new support ticket at WPML support forum for further assistance.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Osama Mersal 1 year, 1 month ago.

Assisted by: Osama Mersal.

Author Posts
May 19, 2024 at 6:38 am #15642294

ingeE-3

Hi! My shop is in EN and NL, EN being the primary language and I'm using the directories for the languages (see image).

The problem was for a long time that when you're searching in the NL shop, it switches to EN. After some help of the AJAX search plugin people in this ticket: https://wordpress.org/support/topic/search-not-working-with-wpml/#post-17765591
I now think that the problem has to do with caching.
Yesterday after purging all cache and reoptimizing SEO data with YOAST, it is now the opposite.

When you search in the NL shop you'll get the NL result but when you search in the EN shop you get switched to the NL shop. Ernest from AJAX Search plugin said it might be that which ever language gets cached first is the one the redirect goes to.

Do you think it's a caching issue? Other reason could be that the home_url gets stripped of the language directory during the search.

So not sure is it a wpml , caching or search plugin issue.

directories.png
May 19, 2024 at 9:15 am #15642431

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please log in to this sandbox site and install the "Ajax Search Lite" plugin. (hidden link)

After that, please try to replicate the issue. If it is replicable, please let me know the steps to reproduce it so I can consult our compatibility team.

Best regards,
Osama

May 20, 2024 at 9:42 am #15644513

ingeE-3

It was caused by the option "Merge inline extra css and javascript" in wp-optimize