Skip Navigation

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

Problem:
The client installed WPML on an event site with Norwegian as the default language. When switching to English using the flag icon, the language initially changes, but navigating to a subpage causes the site to revert back to Norwegian.
Solution:
We identified that the issue was related to the Kadence Advanced Button block, where internal links were not automatically updating to the correct language. To resolve this, we added custom XML configuration in

WPML > Settings > Custom XML Configuration

to register the block for translation. After updating the translation, the links functioned correctly in English. For further details on translating links and attributes, refer to the guide on how to translate URLs, shortcodes, and HTML attributes using the Advanced Translation Editor.
Additionally, check the errata for known issues with Kadence blocks at Kadence block advanced button internal link translation not applied automatically.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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 3 replies, has 0 voices.

Last updated by OysteinH-2 2 weeks, 5 days ago.

Assisted by: Prosenjit Barman.

Author Posts
November 10, 2024 at 9:33 pm #16386120

OysteinH-2

Background of the issue:
I have installed WPML on an event site we're building for a client. The default language is set to Norwegian, and I want to allow users to switch to English. The issue can be seen on the page: hidden link

Symptoms:
When I click on the English flag to switch to the English section, it works initially, but navigating to a subpage switches back to Norwegian instead of staying in English.

Questions:
How can I ensure that the language stays in English when navigating to subpages?

November 11, 2024 at 10:35 am #16387910

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There!
Thanks for contacting WPML Support.

I understand that the subpages in other languages aren't working properly. I tried to access your site, but I couldn’t proceed due to the password protection enabled on it. However, please note that the issue with links in other languages typically occurs if the links in other languages haven’t been updated correctly. Internal links should automatically adjust to point to the correct language versions if translations are available. If you notice any links not updating as expected, please verify that the linked pages have been translated and are accessible in the affected language. Additionally, if a translated page is saved as a draft, this can also cause issues, so it’s important to ensure that all translated pages are published.

If the pages are translated and published and the issue persists, please try editing and saving the original page with the links, ensure that the links are added in relative format then update their translations. Often, updating the translations resolves such issues.

For links added with an anchor tag (`<a>`), please refer to the steps outlined in the guide below to learn the process of translating such links correctly.

- https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

I hope the information above will help. But, if you're still having issues, please share the Password required to access your site. To ensure privacy, I will make sure to keep it private. I'll check and be happy to help.

Best regards,
Prosenjit

November 11, 2024 at 1:35 pm #16388889

OysteinH-2

Yes, it is not a complicated site. Only one landing page, and 2 subpages with text. Here is the password for the page so you can check if there is anything wrong: [removed]

You can also use this link which gives you admin access to investigate more if needed with the "Temporary Logins plugin"

[Removed]

This page will be published on Wednesday, so it would be nice if this could be resolved before launch.

Thanks in advance

November 12, 2024 at 4:30 am #16390809

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update.

I'd like to inform you that as this is a public forum, please don't share any sensitive information related to your site directly in public response. If we need any information such as Debug info, access information, we will enable a private box for you so that you can securely share the access. I hope you can understand.

I checked and found that the link on the homepage button was still pointing to the Norwegian version. To investigate further, I logged in and noticed that the button was created using the Kadence Advanced Button block. We are aware of an issue with the Kadence advanced button block where the internal link doesn't get updated automatically in other languages. Please check the errata below for more details.

- https://wpml.org/errata/kadence-block-advanced-button-internal-link-translation-not-applied-automatically/

To fix the issue, I added the code to register the block for translation in "WPML > Settings > Custom XML Configuration" and then updated the translation. The links are now working correctly in the English version of the site.

Please check and let me know if that helps or if you need further assistance in this matter. I'll be happy to help.

Best regards,
Prosenjit

November 12, 2024 at 6:13 am #16390877

OysteinH-2

Ok, thanks a lot for your help, now it's all right! Can you mark the password message as secret, or delete it?

Have deleted plugin debugging the site backend.