Skip Navigation

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

Problem:
The client recently translated their website but found that links within ACF Wysiwyg boxes were not updating correctly and still pointed to the original language site.

Solution:
We discovered compatibility issues between the client's theme and WPML. For the header buttons with hardcoded links in the theme's source code, we advised the client to contact their theme developer for assistance, as these are not currently translatable with WPML. The specific code can be found in

/modules/hero-banner/hero-banner.php

.

For other links, such as the "Find out more" on the Base Camp page, we identified that they are not registered for translation due to compatibility problems. We provided a link to an errata page (Advanced Custom Field links inside WYSIWYG fields are not automatically translated) that describes a workaround, but noted that it might not be feasible for the client due to the volume of content.

We suggested two alternative options:
1. Using a link field to add the link, allowing ACFML to translate them automatically.
2. Manually translating the link using the translation editor.

We regret that we could not provide an immediate solution and mentioned that a permanent fix should be included in future WPML updates. In the meantime, we recommended manually translating the links.

If this solution does not apply or is outdated, or if you are still experiencing issues, please check the related known issues, verify the version of the permanent fix, and ensure you have the latest versions of themes and plugins installed. If the problem persists, we highly recommend opening a new support ticket in the 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.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 13 replies, has 2 voices.

Last updated by Lucas Vidal de Andrade 7 months ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
January 23, 2024 at 2:17 pm #15217542

paulA-41

Recently trasnlated. But on page links ie in ACF Wysiwig box's have not updated so french page links still point to uk site.

WPML > Settings > Translate Link Targets.

January 23, 2024 at 8:19 pm #15218769

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

If you wish to translate links, you can follow this explanation:
https://wpml.org/announcements/2020/02/translating-links-with-advanced-translation-editor/

In some cases, links do not appear as default for translation in the Translation Editor. If that doesn't solve your issue, can you please share more details of your problem?

1. Please share your debug information:
https://wpml.org/faq/provide-debug-information-faster-support/

2. Please share a screenshot of the page/content you are trying to translate, of the translation screen.

Please let me know if you need any further assistance.

Best regards,
Lucas Vidal

January 24, 2024 at 9:57 am #15220738

paulA-41

But is there a way to do this Automatically. As there is alot of links and pages to work through if not.

January 24, 2024 at 5:11 pm #15223120

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

There 2 important considerations, regarding the issue you're having:

1. WPML Minimum Requirements
I checked your debug info and noticed that your website doesn't have the minimum memory required for WPML to work. WPML requires a memory limit of at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set WP Memory Limit in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

See:
https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php
for details. Increasing WP Memory may help improve the performance and sometimes also help resolving such issues.

Please let me know how it goes.

2. Automatically translate links
I've actually found a recent issue in WPML that is directly related to yours. Fortunately, there's a workaround. Please check:
https://wpml.org/errata/advanced-custom-field-links-inside-wysiwyg-fields-are-not-automatically-translated/

Tell me if that solves your issue, or if you need any further assistance.

January 29, 2024 at 8:52 am #15236556

paulA-41

Hello,

That still didnt seem to work. So there is no other way really to auto translate the links?

Just as we have over 200+ pages and then an issue what I have found if I update the links manual. Some dont update on the page then I get a WPML error page and takes me off the site.

Any ideas?

January 29, 2024 at 12:50 pm #15238297

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for sharing the information. I'll have to directly check your website.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

January 30, 2024 at 8:45 am #15242030

paulA-41

Hi Lucas,

I can not see a private box to grant you access.

January 30, 2024 at 10:58 am #15242808

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi, I'm sorry. Can you please try again?

January 31, 2024 at 11:50 am #15248881

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for sharing access. Your website seems to be correctly set up.

Can you please provide me with an example of a link that is not being automatically translated?

Furthermore, about the error you're getting. Please explain to me, step-by-step, how to replicate the issue. This way, I can better investigate what's going on.

I'm waiting for your feedback.

February 7, 2024 at 2:02 pm #15277003

paulA-41

Hello,

So example - hidden link

There is the two buttons. These are just in the Wyswig box. But not being updated when the translations have ran. But with over 200 pages its not ideal if we need to go through one by one.

February 7, 2024 at 4:15 pm #15277683

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I have checked the specific page, and noticed that the links are relative. Please update them to the full path. Instead of "/our-bikes/", put "hidden link", to see if the automatic translation works.

I know it can be a hassle, but WPML actually needs that to identify the link as internal to translate it automatically. Tell me if after putting the full path of the URL, the links get translated automatically. If that's the case, the URLs should be updated all around the website so that they can be identified by WPML for translation.

Let me know how it goes.

February 8, 2024 at 12:13 pm #15281082

paulA-41

Hi Lucas,

So we have launched the site so the url is now diffrent. But anyway.

Updated this page with the full English URL.

Langagues still not updating - hidden link

February 8, 2024 at 3:51 pm #15282077

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I escalated your ticket to our development team, which will take a more in-depth look and help us find a solution. That usually takes a few days, so I'll keep you posted, as soon as I have new information from them.

Have a lovely day, meanwhile 🙂

February 26, 2024 at 3:28 pm #15345123

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for your patience. After thoroughly investigating your issue, we found that there are compatibility issues between your theme and WPML.

Regarding the buttons in the header, the texts are hard-coded in the theme's source code and are not registered from translation. Translating these buttons with the actual code is currently no possible with WPML. I recommend you reach out to your theme developer. You can check it at /modules/hero-banner/hero-banner.php, the following code:

...
...
	if ($checkbox_value) { ?>
									
								<?php
							} else {  ?>
								<li><a href="/bike-hire/" tabindex="0">Book Bike Hire</a></li>
							<?php
								
							}
							?>
...
...

As for the other links, like the "Find out more" in the Base Camp page, they are also not registered for translation due to compatibility problems. There's an available workaround, but in your case, since you have many pages and content boxes, it's not really feasible, since every box and link should be added to the code.

https://wpml.org/errata/advanced-custom-field-links-inside-wysiwyg-fields-are-not-automatically-translated/

Another options would be:
1. Using a link field to add the link, so ACFML could translate them automatically.
2. Use the translation editor to translate the link manually.

I'm sorry we couldn't get to the desired solution. In future WPML updates the solution described in the errata should be added to it. Until then, I recommend you translate the links manually, using the translation editor.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.