Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is unable to automatically translate button URLs on their website using WPML. Despite setting the links directly and using various WPML tools like re-saving permalinks, deleting WPML cache, and scanning and adjusting links, the URLs are not appearing in the WPML Advanced editor for translation.
Solution:
We recommend the following steps to address the issue:
1. Ensure that the target page of the button URL (Page A) is translated before translating the page with the button (Page B).
2. After translating Page A, go to WPML > Settings > Translate Link Targets to force WPML to recognize and translate the button URL.
3. Alternatively, make a minor modification to Page B and retranslate it. This should allow WPML to automatically create the translated link.
If these steps do not resolve the issue, we suggest removing any custom configurations related to this problem and testing again to see if the issue is workflow-related.

Please note that this solution might be outdated or not applicable to your specific 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 the problem persists, 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.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Andreas W. 7 months, 2 weeks ago.

Assisted by: Andreas W..

Author Posts
June 14, 2024 at 2:34 pm #15740482

hubertusH

Background of the issue:
I am trying to translate button URLs on my site hidden link using WPML. I have set the links in the buttons to 'hidden link' and not to '/page/'. I have followed many instructions such as re-saving permalinks, deleting WPML cache in the tools, and scanning and adjusting links using WPML - settings -> Translate Link Targets.

Symptoms:
Button URLs are not being translated automatically and I cannot find them in the WPML Advanced editor by searching for 'url'.

Questions:
Is there any chance you can help me with translating button URLs?
Why are the button URLs not appearing in the WPML Advanced editor?

June 14, 2024 at 2:34 pm #15740483

hubertusH

***CREDENTIALS REMOVED BY SUPPORT AGENT***

brings you inside the staging environment (htaccess protected)

June 14, 2024 at 7:12 pm #15741177

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Did you try to search for "http" inside the text field on the top left of the Advanced Translation Editor?

Guide:
https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/#main-features-of-the-advanced-translation-editor

If this will not solve the issue, I can offer to have a closer look at the problem but please take note that we are not allowed to access the site, for which the information was not provided inside our private reply form.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

June 15, 2024 at 9:32 am #15741558

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Hubertus,

Yes, we can speak German, but as this ticket was opened on the English forum it is better to stay focused on English.

It appears that I was missing a small detail when reading your first comment.

You are trying to change an internal link for a specific page. Internal links will not show up on the WPML Translation Editor. WPML will automatically adjust those URLs once the content that you are linking to has been translated and published. (Which is the case here)

In case you experience any unexpected issues you can go to WPML > Settings > Translate Link Targets and run this dialog so that WPML can auto-adjust the internal links of the whole website. (This can take a while)

I ran this dialog now and it did not solve the issue.

This might be an issue between WPML, Elementor, and Permalink Manager. I will try to replicate this issue on a new test site and then get back to you.

Best regards
Andreas

June 15, 2024 at 7:46 pm #15742038

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am able to replicate this issue only with Elementor and WPML on a new test site.

The issue has been escalated to our compatilbility team for further revision.

Workaround:

Paste the following config at WPML > Settings > Custom XML Config.

<wpml-config>
  <elementor-widgets>
   <widget name="button">
     <fields>
       <field type="Button: Button text" editor_type="LINE">text</field>
       <field type="Button Link" editor_type="LINK">link>url</field>               
     </fields>
   </widget>
 </elementor-widgets>
</wpml-config>

Now, edit the button URL on one of your pages, save the page and apply the translation again.

This config will make sure that the internal links will be auto-adjusted. Such links are not supposed to show up on the WPML Translation Editor. External link should show up with this config by default.

Best regards
Andreas

June 17, 2024 at 8:02 am #15743774

hubertusH

Dear Andreas,

thank you so much for investigating further. This was very helpful as I was trying the first method you described by using the "translate link target"-run already.

Just to be very precise: In my XML config tab there already is

"<wpml-config>
<elementor-widgets>
<widget name="button">
<fields>
<field type="Button Title" editor_type="LINE">text</field>
<field type="Button URL" editor_type="LINE">link>url</field>
</fields>
</widget>
</elementor-widgets>
</wpml-config>"

My question is, should I replace this using your code or should I add your code to the existing one? In order to make sure it doesn't break something after a WPML update, should I set my self a reminder to remove this code as WPML receives the bugfix update?

Thank you so much!
Hubertus

June 18, 2024 at 11:37 am #15748733

hubertusH

Dear Andreas,

since we need to plan the golive this week, I would really appreciate your further assistance regarding my question. Thank you so much for your efforts!

June 18, 2024 at 3:02 pm #15749703

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

My apology for the delay in answering, as I do not work on Sundays and Mondays.

The mentioned config in your earlier comment was placed by myself. It is the same config.

From our compatibility team I received the following feedback:

I did some testing and I imagine this was the scenario:

Create a page A and B.
In Page B add a button pointing to A.
Translate Page B.
Translate Page A.
As when you translate Page B, Page A hasn't been translated, WPML can't automatically create the translated link.s
However, you can force it by two ways:

Go to WPML > Settings > Translate Link Targets

or

Just refresh Page B (add a small modification) and retranslate it. This time, the link is automatically created.

This means, according to this comment the config usually would not be necessary. I would like to invite you to remove the config and try another test, to confirm if this was somehow workflow-related.

In fact, if I create a new page and add a button to a page that is translated already, I can no longer confirm the issue.

Best regards
Andreas