[Resolved] The button link cannot point to the corresponding language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where buttons on their pages point to the correct language version of other pages when translating from English to other languages. However, when adding a Chinese translation first, all multilingual page buttons incorrectly point to the Chinese (zh-hans) pages instead of maintaining the correct language-specific URLs. Solution: We investigated the issue and suspect it might be related to the fact that Chinese uses encoded URLs and Sticky Links. To provide a precise solution, we need to understand the exact steps the client uses to copy a page. We recommend the client to check if they are using any specific method or plugin to duplicate pages and to share that information with us. But in the meantime, the client confirmed that deactivating Sticky Links resolved the issue.
Please note that this solution might be outdated or not applicable to your case. If the problem persists, we encourage you to open a new support ticket. We also highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us on the 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.
Normally, I create pages in English. There are buttons on the pages, and the buttons point to other pages of the website. When I use wpml translation, these links will automatically point to the corresponding language.
For example, I created a page (hidden link),and there is a button on the page pointing to(hidden link I translate the original page into German, the link also points to (hidden link).But I found something strange, if I add the Chinese translation first, all my multi-language page buttons will point to the zh-hans pages.But if I add the translation outside of Chinese first, everything works fine.
Usually, we are used to adding Chinese translation after creating the English page,how can I keep links from other language pages pointing to the correct language?
Welcome to the WPML support forum. Let me rephrase your issue to see if I understood correctly.
Your main language is English and if you translate an English page to any other language than Chinese you don't have any issue with your internal links. They are automatically translated by WPML.
However if the first translation done is in Chinese, then all internal links will be in Chinese on your other languages once you translate the page afterwards?
It could be related to encoded URLs and Sticky links. Could you please try to deactivate "Sticky links" and run a test?
- Deactivate Sticky links
- Create a new English page (or use a page that is not translated yet)
- Translate it to Chinese
- Then translate it in other languages
If the issue persist, could you please confirm your workflow (step by step) and share some URLs where I can see the issue.
Thank you for your reply. The issue is exactly as you rephrased it. But I'm not using sticky links.
It's really hard to understand that this issue only occurs when adding the Chinese translation first.
I created a staging site for the site (hidden link), maybe you can replicate the issue directly on this site.
1. Copy an existing page (the page with 'intro' in the title), add Japanese, German, French, Polish and other translations to it, check the links, you will find that the links point to the correct language.
2. Copy an existing page (the page with 'intro' in the title), add Chinese translation to this page, and the Chinese page button link points correctly. Continue to add translations in other languages such as German and French. If you check, you will find that the buttons on the German and French pages also point to Chinese links.
Thanks for sharing the steps on how to reproduce the issue and providing a staging copy. That will speed things up.
I have activated a private field for your next answer where you can provide access to that staging copy safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
Thanks for the access. I tried to follow your steps but I don't know how you copy your pages. I thought that you might have a duplicate/copy option from a plugin such as "Yoast duplicate posts" but that's not the case.
I did a short video of my intervention: hidden link
I think it could be related to the fact that Chinese uses encoded URLs and Sticky Links but I need to know how you copy a page to make sure I follow the exact same steps.
Hello, I directly cloned the history page through the divi editor to copy the page, but after you directly disable the WPML Sticky Links plugin,it seems that this problem cannot be replicated.
I will continue to observe it for some more time, thank you for your support 🙂