Skip Navigation

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

Problem:
The client is experiencing two issues:
1) The language switcher is not functioning and does not offer any languages to switch to.
2) Translations are done, but the wrong template is assigned to the translated pages, and attempts to change the template revert back to the default one.

Solution:
We suspect that the client might be encountering a known issue related to templates not being applied to translated pages. We recommend:
1) Checking the problem against the known issue described here: https://wpml.org/errata/template-is-not-applied-to-translated-page/
2) Ensuring to back up the database before making any changes.

Please note that the solution provided might be outdated or not applicable to your case.

With this specific case, we suggested using SQL queries to overcome the issue for the client.

If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If none of these steps resolve the issue, please do not hesitate to open a new support ticket with us.

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

Last updated by Andrey 1 year, 4 months ago.

Assisted by: Andrey.

Author Posts
January 31, 2024 at 9:37 pm #15252262

Stephane

Tell us what you are trying to do?
I've created a site in English. I installed WPML and translated it all in 6 languages, automatically. It costed me 83k credits.
1) the language switch at the top isn't functioning. It offers no language to switch to.
2) the translations are all done when you guess the URLs, but the wrong template is assigned. If I change to another template, it'll revert back to the vanilla one.

Is there any documentation that you are following?
WPML plugin UI and site Documentation

Is there a similar example that we can see?
hidden link
hidden link
hidden link

What is the link to your site?
hidden link

Happy to grant you admin access.

January 31, 2024 at 10:35 pm #15252290

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Is it possible that you are experiencing the issue mentioned on https://wpml.org/errata/template-is-not-applied-to-translated-page/?

We recommend backing up your database before making any changes.

January 31, 2024 at 11:28 pm #15252366

Stephane

Hi Andrey

The description sounds familiar indeed. I tried to follow the steps described and was not able to fix my issue:
- The language switch doesn't pull up the other languages available.
- Navigating to the translated URLs shows the with the proper content but without the proper template applied.

For a moment I was able to see the FR homepage with the right template and now it's gone.

Would you please mind having a quick look to confirm the steps described solve my problem? Maybe I missed something on restranslating the templates in the end?

February 1, 2024 at 9:35 am #15253507

Stephane

May I share with you an admin acces to the site?

February 1, 2024 at 1:30 pm #15255204

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback. I 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.

February 2, 2024 at 4:16 pm #15260192

Stephane

Hi Andrey,

I'm still tweaking the site's header, but I can log out entirely if you need full control with no one messing around. I'm stuck without your help. Any time will work with me!

Thank you for your attention.
Stephane

February 3, 2024 at 12:45 pm #15262057

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback, Stephane. To ensure I do not break your current site, can I make a copy of your website for local tests?

For this, I'll need to temporarily install a "Duplicator" plugin on your site. This will allow me to create a copy of your site and your content. If you prefer to do it independently, you can provide me with the snapshot and send me the installer file and the zipped package you downloaded.

Let me know how you feel about this.

February 3, 2024 at 5:21 pm #15262534

Stephane

Hi Andrey,

Thank you for your response.
Be my guest, install whatever you need to do your thing. I won't touch the site util you tell me it's good from your end.

It's a dev site and I have my backups already.

Thank you
stephane

February 3, 2024 at 5:46 pm #15262551

Stephane

I played around and was able to get the language switch to work again. I can change languages now.
However, (1) templates still aren't sticking to their localized pages and (2) "WP menu sync" is still empty.

February 3, 2024 at 6:51 pm #15262680

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for the update. You can keep working on your website. I will make a copy to test the issue in a local environment and will keep you posted. Have a lovely weekend!

February 6, 2024 at 3:36 pm #15272651

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I want you to know that I reported the problem to the team. I will update you as soon as I have more news.

February 7, 2024 at 2:34 pm #15277133

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

I appreciate your patience. The issue has been reported to our development team. In the meantime, I am sharing the steps to fix the problem manually in the following private reply.

I have already done this to your staging site.

February 8, 2024 at 5:40 pm #15282690
Stephane

Hi Andrey

Thanks for your feedback and congrats on identifying the root cause. I'd NEVER have thought of that. I still have 2 issues:

1) The front page template is addressed in all languages. That's good. However, all the other pages use a template called "Templates des pages 2024". Similar to how it's been for the front page, the template won't stick with the localized versions.
>> Could you share the SQL query I should run to fix this ?

2) the "WP Menu Sync" module seems to be dysfunctional. It says there is nothing to sync. As a result, the header IS translated but not the site links. I did press the "Translate Link Targets" on the Settings page to force the syncing but in vain.
>> How can I get the correct URLs to show up on the localized headers?

Thank you for being so supportive.
Stephane

New threads created by Andrey and linked to this one are listed below:

https://wpml.org/forums/topic/split-the-wp-menu-sync-module-seems-to-be-dysfunctional/

February 10, 2024 at 6:26 pm #15288923

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your update, Stephane.

1) Sharing the query in the following reply. I have tested it on your staging site.

2) I opened a new ticket for your new question. This will also help other users with similar problems find solutions when searching the forum. I will assist you here:
https://wpml.org/forums/topic/split-the-wp-menu-sync-module-seems-to-be-dysfunctional/

February 10, 2024 at 10:51 pm #15289036

Stephane

Running the SQL queries fixed my problem with templates not being applied to local versions of my site.

Let's continue the conversation on the other thread for the WP Menu Sync not picking up my header.

Thank you for your assistance Andrey. Much appreciated