This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with WPML where some internal links were missing parent page parts in the URL, and some links were broken due to incorrect CDATA/script-related URLs. Additionally, button labels were not translating correctly. Solution: 1. We performed a cleanup by clearing the WPML cache, removing ghost entries from translation tables, and syncing translation jobs. This can be done from WPML → Support → Troubleshooting. 2. We re-translated the affected pages, which did not consume additional translation credits as the translations were loaded from memory. 3. For the broken links caused by JavaScript code or custom HTML, we recommended removing such code from the page content or using a shortcode with custom code outside the page content. 4. For internal links, ensure they are inserted correctly in the WPML Translation Editor and complete the translation process. 5. For the button labels in Gutenberg, if they are not appearing in the WPML Translation Editor, it may be necessary to open a new ticket to investigate how the block is structured. 6. For persistent broken links, manually replace them in the WPML Translation Editor and save the translation.
If these steps do not resolve your issues or if the solution seems outdated or irrelevant to your case, 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 problems persist, please open a new support ticket at WPML support forum for further assistance.
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.
I used WPML with AI translation and overall everything went quite well. However, I’m having some issues with certain button links.
1. Often, links to pages that have a parent page work correctly but are missing the parent page in the URL. For example, it should be hidden link but instead I get hidden link
(You can see this in the colored blocks at the bottom of this page: hidden link
2. sometimes few links are broken like this hidden link [you can see in the MIA apartment link at this page hidden link
On the homepage of the translated pages, I simply re-saved them using the editor, and in many cases issue 1 got fixed (but not always). However, if I have to reopen every single page and save them individually, it becomes quite pointless as a task.
I haven’t installed the old Sticky Links plugin (since I’m using the new editor...).
there are other pages with those problems, even in other languages...
1) What exactly did you do when you mentioned "cleanup"? I have two other sites to translate this week and I’d like to avoid running into the same issues.
2) When you retranslated the page, were AI translation credits consumed? Because if I need to retranslate many pages, I’d like to avoid additional costs.
1) By “cleanup” I was referring to standard WPML troubleshooting steps such as clearing WPML cache, removing ghost entries from translation tables, syncing translation jobs, and similar actions from WPML → Support → Troubleshooting. These help fix inconsistencies and avoid issues going forward.
2) No, in this case no additiona translation credits were consumed when re-translating the page, already done translation is loaded from memory.
Let me know how it goes and if you still have issues.
Anyway, i re-translated the home page and the wrong link hasn't changed (hidden link look at the strange URL on Mia apartment (the green block, apartment button - hidden link), but, even worse, all the buttons label in the content are in italian, now ! [prenota ora and vai all'appartamento]
I checked and the URLs are displayed correctly in the editor. Could you please re-translate the page and insert the correct ones again?
Regarding the broken translation, the issue is caused by JavaScript code being added directly inside the page content inside HTML widhet, which interferes with WPML translation.
This approach won’t work properly. Instead, you should place the code outside of the page content. Alternatively, you can use a shortcode together with custom code to handle this more reliably.
Let me know how it goes and if you need further help / steps from my side.
I don’t understand… why do I have to insert the URLs in the translations? Then what’s the point of using automatic translation if I still have to manually go into every single page? Also, there doesn’t seem to be any way to translate the button label… I’m using pure Gutenberg, without any custom modules.
Anyway, I edited the HTML block and removed all the code. I retranslated the page, but nothing changed.
I understand your concern let me clarify how this works.
Automatic translation in WPML translates the text content and internal links, but it does not automatically change external URLs.
For example, links like hidden link are external links, and WPML cannot know what the equivalent English (or other language) version of that URL is. Because of that, these need to be adjusted manually if you want different links per language. Internal links (links to pages within your own website) are handled correctly and I can see they are already working as expected on your English version.
Regarding your page I can still see that the translation is in progress. This usually means the page was not fully completed in the translation editor, or
changes were made but not confirmed.
Please open the translation editor, complete it fully, and make sure you see a pencil icon (not gears) in the pages list that confirms the translation is finished.
- hidden link
As for the button label in Gutenberg, it should normally be translatable via the WPML Translation Editor. If it’s not appearing there, it may depend on how the block is structured, so we may need to check that separately in new ticket.
Let me know once the translation is fully completed if you still have issues to this topic and if not, we can open new ticket and check what is wrong with button label.
So… there was no translation in progress, I had simply opened the page in the English editor without doing anything. Anyway, I saved it as requested.
1. Of course I don’t expect external links to be translated! I’m talking about an internal link — the same one I’ve been referring to since the first message in the ticket (see attachment, the link is incorrect). Maybe in another language it doesn’t happen on this specific link and instead happens on a different apartment link (as you fixed on that French page — but only that one). In other parts of the site the issue is still there and it’s very inconsistent. My site is extremely simple, it only uses basic Gutenberg blocks. Clearly WPML has issues handling internal links. I also tried regenerating the links from the settings panel, but it didn’t solve anything.
2. The issue with the button label only appeared now, after you asked me to retranslate the page. Initially it had been translated correctly (and I’m quite sure the label was translatable). Anyway, I’ll open a ticket for that.
Thank you for your reply let me clarify a few things, as there are multiple link-related issues, and although they may look the same, they are actually different.
Regarding the “Cico apartment” link you initially mentioned that issue has been fixed and works correctly once the page is retranslated.
However, the remaining broken link you just shared a separate issue. These were previously affected by custom script/HTML code inside the page. Because of that, incorrect URLs were saved in the translation memory.
As a result, even after retranslating, the system continues to reuse the previously saved (broken) versions.
The easiest fix is:
- Open the translation in the WPML Translation Editor
- Search for the affected URL
- Manually replace it with the correct one
- Save and complete the translation
I already applied this fix for the “Mia” URL, and it is now working correctly: hidden link
For other pages/languages:
- You will need to retranslate them so the correct links are used
- For broken CDATA/script-related links, you will need to manually adjust the URLs as described above (recommended and quickest option)
Alternatively, you can use “Overwrite translation”, which will ignore the saved translation memory but this may consume credits again.
Since your site is relatively simple, manually correcting the remaining links should be the fastest solution.
If you notice any specific page where the issue still persists after this, feel free to share it and I’ll take a closer look. 🙂