Skip Navigation

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

Problem:
The "Divi Search" module is used to create a custom results page but the search results page displays always in the default language.

Solution:
The search can not work as expected if you are using " Language name added as a parameter" inside WPML > Languages > Language URL format.

Changed the setting to " Different languages in directories".

Relevant Documentation:
https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/

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 6 replies, has 2 voices.

Last updated by Andreas W. 1 year, 6 months ago.

Assisted by: Andreas W..

Author Posts
October 27, 2023 at 1:06 am #14674731

grantS-5

Tell us what you are trying to do?
We embedded a site search module in the website header and created a custom results page. We want the Search module to pass through the selected language through to the results page so that the results display in the language the user conducted the search in.

Currently the search results page displays in the default language

Is there any documentation that you are following?

https://wpml.org/forums/topic/serach-not-working-in-divi/
https://wpml.org/forums/topic/search-results-4/

I tried adding the preserve URL arguments recommendation on one of the support threads, but that just prevented me from toggling back and forth using the language switcher.

Is there a similar example that we can see?

What is the link to your site?

hidden link

October 28, 2023 at 2:02 am #14682573

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

First I would suggest that you verify if the Divi parent theme and all plugins are updated.

You should find WPML updates at Plugins > Add new > Commercial > Search for WPML Updates.

If this still does not solve the issue, please verify if the language cookie setting is enabled:
https://wpml.org/documentation/getting-started-guide/language-setup/enabling-language-cookie-to-support-ajax-filtering/

In the case that this will not solve the issue, please let me know and I will be glad to assist you further.

Best regards
Andreas

October 30, 2023 at 3:52 pm #14693349

grantS-5

Hi Andreas,

Thanks four your reply. There is no change in the output of the Results page as we are not able to pass through the language variable...yet.

Grant

October 31, 2023 at 1:57 pm #14700667

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may have to install a plugin called "All In One WP Migration" to make a copy of the website where I can investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server yourself for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Just take note that WPML should be registered on this site again.

If you are unable to provide such a copy of the site for testing, please let me know on this ticket.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

October 31, 2023 at 5:59 pm #14702937

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

Your search did very likely not work as expected, as you are using " Language name added as a parameter" inside WPML > Languages > Language URL format.

I have changed the setting to " Different languages in directories".

Guide:
https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/

Please verify if this solved the issue.

Best regards
Andreas

November 1, 2023 at 4:48 pm #14709275

grantS-5

Hi Andreas,

Thanks for this, the option switch worked, but now I am facing another issue. This one is related to the Custom Body Template in the DIVI THEME BUILDER.

I have updated the appropriate fields in the String Tranlsation Screen, but do not see it in the Theme builder, When I toggle over to the other language, what ever I add to the text module or buttons over writes the content in both languages.

I thought this might be a memory issue, so I made some changes to the wp-config.php file, but it doesn't seem to be helping.

Do we need to start a new ticket? Or are these issues sufficiently related to continue here?

November 2, 2023 at 2:14 pm #14717575

Andreas W.
WPML Supporter since 12/2018

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

Timezone: America/Lima (GMT-05:00)

Hello,

Please do not edit those translations directly inside WPML > String Translation.

In order to translate Divi Theme Builder contents please go to WPML > Translation Management > Dashboard and filter for "Header Templates", "Body Templates" or "Footer Templates.

Then create a job for each template and translate them with the WPML Translation Editor at WPML > Translations.

Could you please give this a try?

Guide:
https://wpml.org/documentation/theme-compatibility/divi-builder/#translating-custom-global-header-footer

Best regards
Andreas

November 2, 2023 at 2:41 pm #14717907

grantS-5

Thanks Andreas,

I had forgotten about that step... everything is working now as it should.