Skip to content Skip to sidebar

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

Problem:
You are trying to add a link within an ACF WYSIWYG editor field from an EN page to a FR page, but the FR page's href is overwritten with the FR URL.
Solution:
If you're experiencing this issue, we recommend excluding certain pages from being automatically adjusted by WPML's sticky links feature. You can find detailed instructions on how to do this in the WPML documentation on sticky links.
Additionally, you can set a custom XML configuration in WPML > Settings > Custom XML for this field. Here is an example of how you might configure it:

<wpml-config><custom-fields><custom-field action="translate" translate_link_target="0">tests_0_editor</custom-field></custom-fields></wpml-config>

Note that you will need to re-translate the content after applying these settings.

If this solution does not resolve your issue or seems outdated, 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 further assistance is needed, please open a new support ticket 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.

This topic contains 1 reply, has 0 voices.

Last updated by Mark 1 year, 3 months ago.

Assisted by: Dražen.

Author Posts
January 14, 2025 at 7:23 pm #16594675

Mark

Background of the issue:
I am trying to add a link within an ACF WYSIWYG editor field back to the other language. It works on the EN page with a link in the WYSIWYG field to the FR page, but the FR page's href is overwritten with the FR URL. On the EN page in the last sentence ("...French is available here.") The link to the FR page works correctly: hidden link. On the FR page in the last sentence ("...anglais se trouve ici.") The link to the EN page does NOT work and is replaced with the FR url: hidden link. Link to a page where the issue can be seen: hidden link.

Symptoms:
The link to the EN page is replaced with the FR URL on the FR page. The expected WYSIWYG field value in the admin is: Cette version de la vidéo est entièrement doublée en français. La version originale de la vidéo en anglais se trouve hidden link">ici. Instead, the front end displays: Cette version de la vidéo est entièrement doublée en français. La version originale de la vidéo en anglais se trouve hidden link">ici.

Questions:
Why is the link to the EN page being replaced with the FR URL on the FR page?
How can I ensure the correct link is displayed on the FR page?

January 15, 2025 at 8:59 am #16596139

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for contacting us.

If I understand correctly, you are trying to add an EN page link to your FR page content. If yes, then this is expected and you and exclude certain pages with the next code:

- https://wpml.org/documentation/getting-started-guide/sticky-links/#:~:text=Sometimes%2C%20you%20might%20want%20to%20insert%20a%20link%20to%20a%20page%20that%20is%20in%20another%20language.%20Since%20Sticky%20Links%20adjusts%20the%20links%20automatically%2C%20it%20might%20prevent%20you%20from%20doing%20this%20and%20adjust%20the%20link%20to%20point%20to%20the%20same%20language%20instead.

You can also try to set a custom XML configuration to WPML > Settings > Custom XML, for this field, for example:

<wpml-config>
  <custom-fields>
    <custom-field action="translate" translate_link_target="0" >tests_0_editor</custom-field>
  </custom-fields>
</wpml-config>

Note you will need to re-translate.

Let me know how it goes and if this helps.

Regards,
Drazen

January 15, 2025 at 1:18 pm #16597357

Mark

The WPML blacklist filter worked. Thanks!