Skip Navigation

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.

If this solution does not seem relevant to your issue, please open a new support ticket with us.

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 12 replies, has 3 voices.

Last updated by Mohamed Sayed 1 year, 3 months ago.

Assisted by: Osama Mersal.

Author Posts
November 13, 2023 at 8:38 pm #14792201

Oksana Po

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 🙁

Please advise, how can I fix this.

Screenshot 2023-11-13 at 10.15.13 PM.png
November 14, 2023 at 12:04 pm #14797329

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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.

Best regards,
Osama

November 15, 2023 at 4:05 pm #14811511

Oksana Po

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.

Regards
Oksana

November 15, 2023 at 4:07 pm #14811543

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Oksana,

Sure, please take your time.

Best regards,
Osama

November 18, 2023 at 10:00 am #14867511

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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)

Best regards,
Osama

2023-11-18_11-51-55.jpg
November 19, 2023 at 7:54 pm #14871857

Oksana Po

Hi Osama
I have changed the links to the full URL but it didn't help.

Any ideas?

November 20, 2023 at 7:53 am #14873487

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I added the following code to WPML-> Settings-> Custom XML tab.

<wpml-config>
  <elementor-widgets>
    <widget name="button">
      <fields>
        <field>text</field>
        <field>link>url</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

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)

Best regards,
Osama

November 21, 2023 at 9:01 pm #14891109

Oksana Po

Hi Osama
Thank you, I have made some testing )

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.

Maybe you can advise some other solution?

Regards
Oksana

Screenshot 2023-11-21 at 10.50.26 PM.png
Screenshot 2023-11-21 at 10.44.01 PM.png
Screenshot 2023-11-21 at 10.32.01 PM.png
Screenshot 2023-11-21 at 10.18.04 PM.png
Screenshot 2023-11-20 at 9.00.27 PM.png
November 22, 2023 at 8:20 am #14893579

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Oksana,

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.

Best regards,
Osama

November 22, 2023 at 1:12 pm #14898095

Oksana Po

Hi Osama
Thank you

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?

Screenshot 2023-11-22 at 3.04.59 PM.png
November 22, 2023 at 1:23 pm #14898139

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Oksana,

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.

Best regards,
Osama

November 26, 2023 at 8:18 pm #14925789

Oksana Po

Hi Osama

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

Screenshot 2023-11-26 at 9.07.18 PM.png
Screenshot 2023-11-24 at 10.30.56 AM.png
November 27, 2023 at 10:06 pm #14934967

Mohamed Sayed

Hi Oksana,

Osama will be away for a few days, so I will be glad to help you.

From what I understand, the issue was resolved by changing the page slug.

Could you please confirm?

Kind regards,
Mohamed

November 28, 2023 at 7:10 am #14936075

Oksana Po

My issue is resolved, thanks