Skip to content Skip to sidebar

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

Problem:
The client is experiencing issues with the search functionality on their multilingual website using WPML. Specifically, search results are displayed correctly in the default language (NL), but no results are found in other languages (e.g., EN). Disabling the WPML String Translation plugin temporarily resolves the issue, indicating a potential compatibility problem with the theme or incorrect URL parameters being added.
Solution:
1. Verify that the theme is updated to the latest version.
2. Check if the URL parameters are being translated by WPML String Translation and adjust if necessary.
3. Test the search functionality in a minimal environment to rule out conflicts with other plugins or database issues.
4. If the issue persists, consult the theme support for potential known issues or fixes.
5. Review the WPML errata documentation for any related known issues: https://wpml.org/errata/wpresidence-no-results-found-in-advanced-search/

If this solution does not resolve the issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend opening a new support ticket. Also, ensure you have the latest versions of themes and plugins installed. For further assistance, please visit our support forum: 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.

Tagged: 

This topic contains 22 replies, has 2 voices.

Last updated by Bobby 1 year, 4 months ago.

Assisted by: Bobby.

Author Posts
July 30, 2024 at 12:53 pm

guntherD-3

Background of the issue:
We are encountering problems with the search bar. We are using WPML. On the default language (NL) the search results are shown. On a translated page (for example EN) there are no results found. On homepage hidden link we go to the search block in the header. At "project name" we enter "palo" en then we click on "Search properties", the following page shown: hidden link. This shows the correct results. When we go to EN website hidden link and do the same (at "project name" we enter "palo" en then we click on "Search properties") we get "No results found", see: hidden link. Link to a page where the issue can be seen: hidden link. When we disable "WPML String Translation", the search results shown correctly, please see our test environment: hidden link.

Symptoms:
On the default language (NL) the search results are shown. On a translated page (for example EN) there are no results found. When we disable "WPML String Translation", the search results shown correctly.

Questions:
Why are search results not shown on the translated page (EN) when using WPML String Translation?
How can we fix the issue so that search results appear correctly on the translated page?

July 30, 2024 at 3:40 pm #16021336

guntherD-3

Please send updates to bart@ictready.nl

July 30, 2024 at 9:04 pm #16022407

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Unfortunately I cannot send updates to a specific email, but if they have a wpml account they can follow this thread.

When using the search function, there are parameters added in the URL as seen here:

hidden link

slaapkamers, naam, budget

These parameters most likely are being translated and that causes the search not to work when WPML ST is activated.

Is there somewhere in the backend that you can edit these parameters? This will help me find which string they are coming from as there are many strings with these names.

July 31, 2024 at 7:13 am #16023145

guntherD-3

Hello Bobby,

Because we don't have a valid license on the test environment, not all theme settings are shown. I can give you access to the live environment so you can see how these fields are specified.

I've attached an image, please see how these fields are specified.

Schermafbeelding 2024-07-31 om 09.08.23.png
August 1, 2024 at 12:01 am #16027199

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Thank you for the screenshot!

I believe I have found the issue.

Notice these 2 URLs

without WPML ST:
hidden link

with WPML ST:
hidden link

/?lang=en is added to the URL, this is not correct as we are using the directories language Url format.

If possible go to Themes and update to 4.22.1 version of the theme and let me know your results, please.

August 1, 2024 at 7:11 am #16027874

guntherD-3

Hello Bobby,

Thank you.

We updated theme to version 4.22.1 and the problem still exists, please see: hidden link

It is still adding the "lang=en" tag.

August 1, 2024 at 7:44 pm #16031262

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Thank you for verifying.

To further debug this I'd like to test in a minimal environment to ensure it's not caused by something 'stuck' in the database or a third-party plugin as we don't have any known reported issues from your theme developers and WPML.

I created a sandbox for us here:
hidden link

Please use the link above to access it and add a search function to the homepage similar to the one you are using on the live site. I have attempted to reproduce it but I might be doing something wrong.

August 2, 2024 at 6:59 am #16031806

guntherD-3

Hello, we already set-up an sandbox, please see: hidden link.

Your colleague created this sandbox. We can't use the options of the theme because we do not have a valid license for sandbox. Like we already said earlier.

August 5, 2024 at 2:35 pm #16040852

guntherD-3

Hello Bobby, did you see my reply?

August 5, 2024 at 5:19 pm #16041286

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Yes, I am working on this issue and will update you as soon as I have new information.

In the meantime, I'd recommend also letting the theme support know about this issue as they might already know about it and have a fix.

In summary, the issue is happening because the parameter /?lang=en is being added even though it is not enabled on WPML's side.

August 14, 2024 at 1:10 pm #16070719

guntherD-3

Hello Bobby,

Do you have any update or ETA for the fix?

If you like, the theme developer can set-up a test license on the sandbox. Do you have a actual sendbox for me? Or don't you need a (new) sandbox for now?

August 14, 2024 at 10:19 pm #16072645

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

We have been in communication with the theme author regarding this issue and he provided us with a license on the sandbox.

To get proper help on this issue we will need to ensure the Theme Options are copied onto the sandbox from the live site.

At the moment in your staging site I cannot access the theme options to review them and copy them on the sandbox, if possible, please access the sandbox and configure/copy the theme options from your site onto our sandbox for our team and the theme author to further help debug this issue.

hidden link

August 15, 2024 at 8:26 am #16073341

guntherD-3

Hello Bobby,

I'm getting a "504 Gateway Time-out" when accessing sandbox.
Hereby I send you the theme export URL (this URL has to be hidden): hidden link

August 19, 2024 at 7:37 am #16082288

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

I am not 100% positive the import of the theme options worked as I am not able to reproduce the issue.

1. Go to hidden link

2. Search for 'Palo' in project name

3. You will see a property named Palo populated

4. Switch languages to EN and it will work OK there as well (EN is the default language)

Please use this link to login to the sandbox environment and verify that the theme options are set up as they should be based on your live/staging environment where the issue is present.

hidden link

You should be able to access it now without an err 504.

August 28, 2024 at 2:22 pm #16115770

guntherD-3

Will come back to you soon