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

Last updated by pabloA-26 1 month, 1 week ago.

Assigned support staff: Bruno.

Author Posts
August 16, 2019 at 12:33 pm #4406249

pabloA-26

Hi,

We have spanish as default language. When you search something in the english version (hidden link) the result page directs you the spanish site.
For example if you search: "calendar" in the english version you see spanish results (the url lost the lang parameter ?lang=en): hidden link

thank you

August 16, 2019 at 7:30 pm #4407981

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us. This can be a compatibility issue. Could you please switch the URL format of the language to directories? You can follow these steps:

- Click on the WPML > Languages > Language URL format
- Select the "Different languages in directories" option
- Click on the Save button

By following the steps above and searching, is the issue resolved? Is the language displayed correctly?

Thank you.

August 19, 2019 at 9:14 pm #4419205

pabloA-26

I've followed the instructions above but now I don't get results at all, even though the quick search does work (image attached)

August 19, 2019 at 10:23 pm #4419431

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Note:

*** Please, can I install the Duplicator plugin (or All in One Migration) to make a copy of your site and install it on my test environment? This will help me debug the problem.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

August 20, 2019 at 9:32 am #4422165

pabloA-26

Bruno, I cant give you access (under a firewall) but I can give you a All in one migration backup for you to test with. Would that work for you?

August 21, 2019 at 1:56 am #4427013

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Sure. If the file becomes too large, please filter the images (as long as this is not the focus of the problem) so that the file becomes smaller.

Then just send the link so I can download and test in my test environment (Google Drive, Dropbox, etc). Your next message will be private.

Thank you.

August 22, 2019 at 11:52 pm #4443181

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you. I downloaded the content from your site and I will test it in my test environment.

Soon I will contact you.

Thank you.

August 23, 2019 at 6:58 am #4444583

pabloA-26

Awesome, thank you!

August 26, 2019 at 10:45 am #4457731

pabloA-26

Hi, any luck with this? Just replied so I keep the thread alive =)

August 27, 2019 at 1:07 am #4461819

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

I have tested this in my test environment, but it seems to be working correctly. I followed the steps below:

- Click on the WPML > Idiomas > Filtrado de idiomas para operaciones AJAX
- Check the "Guarde una cookie de idioma para admitir el filtrado de idioma para AJAX" option
- Click on the "Guardar" button
- On the front end, it seems that in both languages this is working, either in "instant" search or in search to display all results. I will attach two images for you to see.

Note: I tested both logged in and logged out. Should I take any other steps to replicate the problem?

Thank you.

August 27, 2019 at 9:56 am #4464609

pabloA-26

Awesome. I've implemented this in production.

Working ok now:
- The instant search does work ok
- If you click on "show more results" it leads to the results

Still not working
- If as a user I enter a search without using any of the above (hit enter for example on the search bar) the search is done in spanish

How to test the above:
- On the english site search for any term such as "3D" and hit enter. The results are in spanish
- If you search something dumb "xxxxx" then you go to the "Nothing found" page in spanish.

It's weird because when you use the "Show more results it does lead you to english results but if the search is entered then the search is done in spanish.

August 30, 2019 at 1:05 pm #4487343

pabloA-26

Hi there, have you been able to see my last response?

August 30, 2019 at 10:27 pm #4489349

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Sorry for the delay. This is happening because the theme is not fully compatible with WPML. In this part of the search should be necessary to implement these steps: https://wpml.org/documentation/support/creating-multilingual-wordpress-themes/search-form/

Another option would be to use the URL format per directories. To do so, you should follow the steps below:

- Click on the WPML > Idiomas > Formato URL del idioma
- Select the "Distintos idiomas en los directorios" option
- Click on the Save button

Following the steps above should solve the problem as well. Could you please follow the steps above and check if the problem persists?

Thank you.

September 4, 2019 at 4:39 pm #4512905

pabloA-26

My issue is resolved now. Thank you!