Skip Navigation

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

Problem:
The client reported that their website was displaying posts in English when clicking the 'load more' button, even though the default language of the page was set to Chinese (zh-hans).
Solution:
We suggested the client to try a specific solution related to WPML rewriting the .htaccess file, which could potentially resolve the issue of posts loading in the incorrect language. The detailed steps can be found here: WPML Forum Post.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at WPML 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 do not hesitate to 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.

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by Kor 8 months ago.

Assisted by: Kor.

Author Posts
May 10, 2024 at 2:13 pm

davidO-15

Site not displaying posts in the correct language

May 10, 2024 at 2:59 pm
May 10, 2024 at 3:00 pm #15615456

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

Here is the ticket. I need temporary access (WP-Admin and FTP) to your test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

May 13, 2024 at 8:15 am
May 13, 2024 at 8:58 am #15619198

davidO-15

I've just seen the cookie wp-wpml_current_language is being overwritten just after loading the site, do you know the reason why this is happening?

May 13, 2024 at 9:54 am #15619696

davidO-15

Hi again, I think this issue of overwritting the wp-wpml_current_language is caused by WP Rocket.

May 13, 2024 at 9:55 am #15619715

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Are you saying that it works after disabling the WP Rockets plugin?

May 13, 2024 at 10:03 am #15619789

davidO-15

I'm saying that it works but not fully correctly. If I disable WP Rocket, the wp-wpml_current_language is not overwritten and it shows the correct language but it's still loading each post from all languages but with the correct URL.

Captura de pantalla 2024-05-13 a les 11.02.13.png
Captura de pantalla 2024-05-13 a les 11.01.43.png
May 13, 2024 at 10:20 am #15619923

davidO-15

I've fixed this last bit so it's working correctly now, but for it I need the WP Rocket disabled otherwise it is overwriting the wp-wpml_current_language cookie, any solution so I don't have to disable it?

May 13, 2024 at 10:23 am #15619946

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Could you please try the solution here https://wpml.org/forums/topic/wpml-is-rewriting-htacess-file-and-causing-white-screen-on-website/#post-14480533 and see if it works?

May 13, 2024 at 10:38 am #15620128

davidO-15

I think it works now! It's not working on my laptop but I think I'm being cached, I've checked it with two other devices and seemed to work fine there!

May 13, 2024 at 12:56 pm #15621081

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Glad to know that it works. If you need anything further, you can open a new ticket or contact us via chat.