[Resolved] Original URLs for translated pages in the Elementor links
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using Elementor and Custom Permalinks plugins and is encountering issues with translating URLs. Some pages display the original URL in the Dutch language instead of the translated version, and there are no fields to add link translation. Updating Elementor templates causes the links to revert to Dutch.
Solution: 1. We recommend changing the slug of the problematic page or registering the buttons as a workaround. 2. Use the "Yoast Duplicate Page" plugin to duplicate the page. After duplicating, change the slug of the existing page to include '-old' and let the new cloned page have the current slug. This should allow the URL to work correctly after translation. 3. If the issue is related to an image name that matches the page URL, change the slug using "Quick edit" and update the image title to ensure it has a different URL.
I use Elementor and Custom Permalinks plugins. I'm trying to add page urls to the menu or in the footer or any other place, for some pages it works properly and gives a translated url. But I have some pages that display the original page URL(NL language for any other language), and there are no fields to add link translation (screenshot attached, the fields for links should be presented where the red lines are).
I can change the link using String Translation. But it works only until the Elementor template wasn't updated, after updating the links on translated languages becomes NL again.
If I change the NL URL for the "broken" page it works properly and gives me the option to add a translation, but I can't change the original page urls, I need it to work properly with existing urls.
It looks like WPML saved the translations for some page urls and there is no way to change it 🙁
Thanks for contacting WPML forums support. I'll be glad to help you today.
Please let me know the problematic page name. Also, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Hello Osama, thank you for your response.
Okay I see, so it'll be a separate env on AWS. I'll get back to you as we manage to provide you with credentials.
Thanks for the access details. Please try to use the full URL in the Elementor widget and check if that fixes the issue. (Kindly check the attached screenshot)
After that, I added the full URL to the problematic button and translated the template. Please check if the URL works correctly in the English menu template. (hidden link)
Now I see the missing inputs for the links translation of the needed pages, but all the translated links become NL (you added/en/ there but there are no links that were there previously(screen1)).
It could solve the issue if the links only for the one template should be updated, but I have changed the button element in another template: hidden link and as a result, all the translated links that were in EN became NL(screen2).
Then I tried to update the page, and the elementor button link in translation appeared as not translated (screen3).
So as a result, after you added the code above all the links for the Elementor buttons should be translated once again through the whole website.
It's not a good option, to translate all the button links. The main issue is not in a link translation, it's a few pages which URLs don't appear correctly while translating. It doesn't matter what elementor widget we use: button, icon with link... there is no input for link translation for these two pages and they are translated wrongly.
As an example(screen4) its website footer, we use icon list, and we have no inputs for translation of some links(screen5). I have added blue and red lines were the inputs should be presented. For blue lines links in EN are correct (seems WPML knows which translation should be taken for most of the pages even if there is no input) and for red lines WPML takes NL link for EN or FR translation.
1) I removed the button code so you can update your templates safely.
2) I created a test page to replicate the issue, which was replicated using an icon list. (hidden link)
The two problematic pages are still not appearing in the translation editor. Please try to change these pages' slugs, update their translation, and check the issue.
I have changed the slug for one of the pages (screen) and it translates properly, as I mentioned at the beginning of our investigation.
It's not a very good solution from seo side to update the page slug. Maybe there is another solution?
Thanks for your update. The issue seems to be on this slug. Changing the slug or registering the buttons are the workarounds for this case.
Another test would be duplicating this page using the "Yoast Duplicate Page" plugin. After closing the page, change the slug of the existing page to (slug-old), and the new cloned page will have the current slug to check if it will work correctly.
I had cloned pages but it didn't help. But when I was cloning the pages I changed the page slug with "Quick edit"(screen) and updated the page translation. Then I updated the title on the button in Elementor template(for the menu) and the input field for translation appeared in EN language. For the Trichomonas page, the trouble was also in the image name which was the same as the page URL, so I changed the slug in "Quick edit" and updated the image title so it got another url.
So we did it!
Thank you very much for your help!
Regards
Oksana