Skip Navigation

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

Problem:
If you're experiencing issues with Ajax Search Lite showing zero results on English pages of your multilingual website while using WPML, it's likely due to the way Ajax Search Lite handles languages and post translations. This occurs because there are no actual posts created in the English version, and WPML’s fallback mechanism doesn’t create a separate database entry for the secondary language.
Solution:
To resolve this, you can either translate the posts into the secondary language or disable WPML compatibility in the Ajax Search Lite plugin. Disabling WPML compatibility allows the plugin to display results from different languages. You can follow the steps in this screenshot to disable WPML compatibility: https://i.imgur.com/8Sh3uMu.png

If this solution does not apply to your case, or if it seems outdated, 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. Should you need further assistance, please open a new support ticket at WPML support forum.

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 Prosenjit Barman 8 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
September 18, 2024 at 6:12 pm #16194982

sylvainP-9

Background of the issue:
In my website, hidden link, I have used both WPML and Ajax Search Lite plugins. The website's default language is French, and English is the secondary. All the posts have been created in French version, but no posts in English version. I have set all the post types to Translatable (use translation if available or fallback to default language).

Symptoms:
If the user visits a French page and searches something using Ajax Search Lite, it works. However, if the visited page is in English, it shows 0 results.

Questions:
Why does Ajax Search Lite show 0 results on English pages?
How can I make Ajax Search Lite work correctly with WPML on English pages?

September 19, 2024 at 4:53 am #16195933

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're experiencing with Ajax Search Lite on your website. It seems to stem from how the plugin handles languages and post translations in WPML.

Since there are no actual posts created in English, no results appear when using the search function in the English version of the site. Please note that WPML’s fallback mechanism doesn’t create a separate database entry for the secondary language. Instead, it programmatically displays the default language posts in other language when no translation exists. As a result, the search returns no results because there are no real posts in the secondary language.

I hope you can understand. In order to see the result correctly in secondary language, you can translate the post into the secondary language. Additionally, you can disable WPML compatibility in Ajax search plugin, which will allows displaying results from different languages as well. Please check this screenshot(hidden link) to understand the process of disabling WPML compatibility.

I hope you can understand. Feel free to let me know if you need further assistance or clarification. I will be happy to help.

Best regards,
Prosenjit

September 19, 2024 at 12:56 pm #16198887

sylvainP-9

Hello Prosenjit,

I tried the approach that you suggested, and it worked well. "Additionally, you can disable WPML compatibility in Ajax search plugin" This is what worked for me. So, thank you very much for your support.

Best regards.