Skip Navigation

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

Problem:
The client was experiencing an issue where links inserted in the ACF WYSIWYG editor were not pointing to their translated content.

Solution:
First, we recommended applying the workaround described in our errata page: Advanced Custom Field links inside WYSIWYG fields are not automatically translated.

When that did not resolve the issue, we suggested the following steps:
1. Create a full backup of the site.
2. Update all outdated plugins.
3. Update the WPML plugins.
4. Flush the cache memory.
5. Edit the post in the original language and make a small change to the content.
6. Save the changes and update the translation.
7. Double-check if the issue disappeared.

After these steps did not fully resolve the problem, we advised running a scan for internal links again. We then converted the chat into a forum ticket for further assistance and potential escalation to our second-tier support.

Additionally, we updated the XML configuration for the custom fields to ensure the correct field names were targeted:

<custom-field action="translate" translate_link_target="1">intro_de_la_page</custom-field>

We instructed the client to edit the content in the original language again, make a small change, update the translation, and then check if the links in that field were updated.

If this solution does not seem relevant to your issue, please do not hesitate to 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.

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.

Tagged: 

This topic contains 18 replies, has 2 voices.

Last updated by Carlos Rojas 10 months, 3 weeks ago.

Assisted by: Carlos Rojas.

Author Posts
November 28, 2023 at 10:11 am

jmcb-communicationB

Link inside ACF WYSIWYG are not automatically translated

November 28, 2023 at 11:02 am
November 28, 2023 at 11:15 am #14938053

jmcb-communicationB

I ran a new scan but it's still not working as planned.

November 28, 2023 at 11:20 am #14938075

jmcb-communicationB

Just wanted to show you another site (as you can see it's built the exact same way since we use a site template) and everything is working fine on that one (hosted on the same server with same resources).
-> hidden link

If you want WP Admin to that one and see what might be the difference, let me know.

Note that on the working site, I did not have to sue this workaround -> https://wpml.org/errata/advanced-custom-field-links-inside-wysiwyg-fields-are-not-automatically-translated/

November 28, 2023 at 12:33 pm #14939277

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi there,
Thank you for your messages. If we need access to the other site I will let you know.

Could you authorize me to create a copy of the site in order to reproduce the issue on test environment?

November 28, 2023 at 12:47 pm #14939427

jmcb-communicationB

Of course. You can install an export plugin if you'd like.

November 28, 2023 at 1:46 pm #14940357

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Thanks. I made a copy of the site.

I will get back to you as soon as I get more information.

December 4, 2023 at 11:18 am #14985755

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi there,

I updated the XML file in WPML -> Settings -> "Custom XML Configuration" tab from:

<custom-field action="translate" translate_link_target="1">tests_0_editor</custom-field>

to:

<custom-field action="translate" translate_link_target="1">intro_de_la_page</custom-field>

to match the name of the file.

Now I kindly ask you to edit one of the contents in the original language -> Make a small change and update the translation

Then double-check if the links in that field are updated.

Looking forward to your message.

December 4, 2023 at 4:52 pm #14989921

jmcb-communicationB

Hello Carlos,

It seems it worked for the EN translation but not the ES ...

hidden link

Also, if this finally works, I guess I will have to have one line "<custom-field..." per ACF WYSIWYG field ?

Thanks again for your help.

December 5, 2023 at 10:04 am #14995089

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi there,

Yes, you will need a line per ACF field that contains the links.

Regarding the ES translation: please make sure to make a small change in the content in the original language and then update the ES translation. That way the entry in the database for the pages gets updated and the links fixed.

December 5, 2023 at 12:56 pm #14997415

jmcb-communicationB

Can you confirm this is a good example for wo or more fields ?

<wpml-config>
<custom-fields>
<custom-field action="translate" translate_link_target="1" >acf_wysiwyg_field_1</custom-field>
<custom-field action="translate" translate_link_target="1" >acf_wysiwyg_field_2</custom-field>
</custom-fields>
</wpml-config>

Thanks.

I did update the original content in both languages but only the EN "intro_de_le_page" link was updated to point to the translated content. WIll try again and let you know.

December 5, 2023 at 1:18 pm #14997823

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Yes, that is a good example of XML. In this link you will find the guide on how to generate that code: https://wpml.org/documentation/support/language-configuration-files/

December 7, 2023 at 3:26 pm #15018401

jmcb-communicationB

Hi Carlos,

None of the above solutions work. I'm facing the exact same issue on another site, this issue is starting to cost us money and reputation.

On hidden link None of the links in ACF WYSIWYG fields are translated. We use ACF on all of our sites and I believe it is one of the most used plugins in the WP ecosystem. How is WPML not fully compatible with such a plugin ?

Please help us resolve this issue.
(Credentials for the other site available upon request)
Thanks.

December 7, 2023 at 3:40 pm #15018717

Carlos Rojas
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Hi,

ACF is compatible with WPML.

1.- Please describe the steps to reproduce the issue in the hidden link site

2.- I have set your next answer private so you can share the access credentials to the hidden link site in a secure way.

December 7, 2023 at 3:46 pm