This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues with missing language prefixes in URLs on your WordPress site using WPML, specifically on buttons within pages edited with Elementor, where the URL appears without the language prefix (e.g., 'magicofcolors.eu/produkt/rulou-de-gazon/' instead of 'magicofcolors.eu/ro/produkt/rulou-de-gazon/'), this might be due to incorrect URL settings in Elementor. Solution: 1. Open the default page in the Elementor editor. 2. Edit the button's link to include the absolute URL (e.g., 'https://example.com/product/product-name'). 3. Update the translation of the page. 4. Regenerate CSS in Elementor to reflect the changes on the live page. Additionally, ensure that the linked page or post is translated. If needed, you can translate the link directly in the Translation Editor. For detailed instructions, refer to this guide.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, we recommend opening a new support ticket. We also highly suggest 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. For further assistance, please visit our support forum at 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.
Background of the issue:
I am trying to fix URL translations for my WordPress site using WPML. I have a problem on 2 of 12 translated pages where the language prefix is missing.
Symptoms:
The URLs for two pages are missing the language prefix. For example, I have: magicofcolors.eu/produkt/rulou-de-gazon/ instead of: magicofcolors.eu/ro/produkt/rulou-de-gazon/. The problem is present only on 2 pages and I can't make the correct URL.
Questions:
How can I fix the missing language prefix in the URLs for the two affected pages?
I understand that in the RO version, the buttons show links from the default language instead of the RO version. Please note that if the linked page is available in RO, the link should be automatically updated on the RO version of the page or post. Could you please check to ensure that the page or post you are linking to in the button has been translated?
It looks like you've added a relative link to the button. Since the linked product has already been translated, it should automatically update in the translated version. Please try the following steps to help translate the links:
1. Open the default page in the Elementor editor.
2. Edit the link:
- If you want to translate the link from the Translation editor, add the absolute URL (including the site domain, like hidden link).
- If you want the link to update automatically, add the relative URL without the first forward slash (e.g., produkt/trevna-rolka/ instead of /produkt/trevna-rolka/).
- You can also dynamically link the product to the button using the Dynamic link feature of Elementor.
3. Save the changes and update the translation. If you added the absolute URL, you can translate the URL from the translation editor by following the guide I shared in my first message. In the case of the other two ways, the link should be updated automatically in other languages.
Please let me know if the information above helps or if you need further assistance in this matter. I will be happy to assist.
Thank you!
As matter of fact the solution is a bit different.
1. Open the default page in the Elementor editor.
2. Edit the link: add the absolute URL (including the site domain, like hidden link).
3. Update the translation.
4. Regenarate CSS in Elementor.
Without renegeration there is no change on live page.