Skip to content Skip to sidebar

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.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Prosenjit Barman 12 months ago.

Assisted by: Prosenjit Barman.

Author Posts
August 3, 2024 at 5:54 am #16035076

alexanderS-177

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?

August 3, 2024 at 8:37 am #16035185

alexanderS-177

I just noticed that AI edited wrong my case.
URL of the buttons are missing language prefix.

August 4, 2024 at 8:01 am #16036229

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thanks for contacting WPML Support.

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?

If you want, you can also translate the link directly in the Translation Editor by adding the link to the translated page or post. For detailed instructions on how to do this, please refer to this guide: https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Let me know if the info above helps or if you need further assistance. I will be happy to help.

Best regards,
Prosenjit

August 4, 2024 at 11:02 am #16036503

alexanderS-177

Hello Prosenjit,

There it is

https://wpml.org/wp-content/uploads/tmp/button_url.jpg

This is translation of the page and respectively the button's URL.

On the live page buttons url is magicofcolors.eu/produkt/rulou-de-gazon/ instead of
magicofcolors.eu/RO/produkt/rulou-de-gazon/

On most of the pages the buttons are correct .../ro/...., but on few of them, like the case above, prefix is missing.

button url.jpg
August 5, 2024 at 8:20 am #16037938

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thank you for the update.

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.

Best regards,
Prosenjit

August 5, 2024 at 1:21 pm #16040300

alexanderS-177

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.