Skip Navigation

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 0 replies, has 2 voices.

Last updated by Ton 1 week, 5 days ago.

Assisted by: Andreas W..

Author Posts
November 11, 2024 at 1:22 pm #16388692

Ton

Background of the issue:
I am trying to auto-translate an ACF Link Field on my site hidden link using WPML. I have set the field to translate, but it doesn't show a translated URL where it should. I am using automatic translation for French.

Symptoms:
The ACF Link Field does not show a translated URL. I cannot change it manually because it says it is locked due to being set to WPML copy. Updating affected posts for changes runs indefinitely.

Questions:
Why doesn't the ACF Link Field show a translated URL?
Why can't I manually change the ACF Link Field?
Why does updating affected posts for changes run indefinitely (It never starts, its in the database "Starting date" -> "NULL"?

November 11, 2024 at 10:32 pm #16390375

Andreas W.
Supporter

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

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

Hello,

The ACF Link Field by default is set to "Copy". This would be ideal for internal links, as WPML handles them automatically, but you can not translate external links this way.

Currently the only way to make it translatable with the WPML Translation Editor, would be using the "Expert" mode and setting the field to translate.

After changing the setting, you will need to edit the link field on the original content, save the page or post and then translate again.

It might occur in this case, that the link will not directly appear on the WPML Translation Editor, as it is a non-visual element and they are usually removed form the UI.

In such case use the search field in the top section of the translation editor and search for "http".

Then translate your links accordingly.

Take note, that you can not translate those automatically, as a translation engine would not understand how the link would need to get adjusted in a second languages.

I hope this helps, but if you run into an unexpected issues, please let me know.

Best regards
Andreas

November 12, 2024 at 7:56 am #16391198

Ton

Hello Andreas,

Weekends are for fun stuff, no problem!

For the majority they ARE internal links. The ones that are not, is no problem they are the same.

So I would indeed think they would be translated.

Care to shine a light?

At the moment I have written a custom function that still translates the URL's, but that's not ideal of course.

Hope to hear from you.

Kind regards

November 12, 2024 at 8:37 pm #16394589

Andreas W.
Supporter

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

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

Hello,

I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further.

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

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

I may need to install a plugin called "All In One WP Migration" here to create a copy of the site that I can use to investigate the issue further.

However, I would also be very grateful if you could provide a staging site or copy of the website from your server for this purpose.

If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/de/account/websites/.

If you are not able to provide such a copy of the website for testing, please let me know on this ticket.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

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

Best regards
Andreas

November 13, 2024 at 5:47 pm #16399004

Andreas W.
Supporter

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

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

Thank you very much for providing access to a staging site.

The field group "Pagina" is set to "Same fields across languages". This field group setting is dedicated for translating the content with the WPML Translation Editor but by default it will "copy" any link fields.

You will need to change the field group to "Export" mode, change the link fields to "Translate", then edit the link fields on the original content, save the page and translate it again.

Now you should see the links available for translations and you will need to adjust them manually, as the automatic translation engine is not able to translate them.

What I am not understanding here, is that the group "Pagina" had a Flexible Content Group that is actually emtpy. I do not see any link fields here.

Could you please calrify how this content is created, as I can not follow at the moment.

November 13, 2024 at 7:07 pm #16399306

Ton

Hello Andres,

Yes of course I can clearify.
The blocks for the Flexible content are added dynamicly from the "Inactive" ACF groups.
This way we can turn on/off any Flexible content blocks.

So it is actually the ACF block: Doorkiesblokken that is loaded in that place.

November 13, 2024 at 7:09 pm #16399326

Ton

Question from my end, what field WOULD be translated to the right URL just like the WYSIWYG fields?

November 13, 2024 at 7:25 pm #16399344

Andreas W.
Supporter

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

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

Thank you for the clarification.

In this case, set the "ACF block: Doorkiesblokken" group tp "Expert" mode and set the link fields to "Translate".

Any field that is set to "Translate" should show up inside the WPML Translation Editor, but you might first need to edit the original field after changing the config and then translate the page again.

If this does not solve the issue, please let me know.

November 14, 2024 at 7:55 am #16400927

Ton

Hello Andreas,

I did what you said, but it's not working. I still see the field being locked.
Also the screenshot from my first comment is getting bigger and bigger, but they never finish.

I think this might have to do with it?

Can you take a look?
We also are developing a other site, that does NOT have this issue of "Updating affected posts for changes in translatable fields". So what's wrong with this installation than?

November 14, 2024 at 11:04 am #16401870

Ton

Could you also answer my question about what field WOULD be translated?
In a new website, I am now using the ACF field "Page link", so not the "Link" field anymore.

Would that be translated?

November 14, 2024 at 5:32 pm #16404422

Andreas W.
Supporter

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

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

I ran a quick test and created the test post "WPML Test" (Draft).

In fact, the link will not appear direclty. You will need to search for it in the text field on top of the editor. Type "http" and you should see the links.

November 15, 2024 at 6:23 am #16405771

Ton

Hello Andreas,

Ok check i see it now, also on my own links.
Still the question though:

Could you also answer my question about what field WOULD be translated?
In a new website, I am now using the ACF field "Page link", so not the "Link" field anymore.

Would that be translated?

November 15, 2024 at 6:26 am #16405773

Andreas W.
Supporter

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

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

In "Expert" Mode any field that is set to "Translate" should be translatable with the WPML Translation Editor.

Anyhow, there are recommended settings to be aware of, that are explained here:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

November 15, 2024 at 8:41 am #16406463

Ton

Sorry, but i dont think you understand the question.

If I enable automatic translation (Or "Copy"), will it auto-translate the links for ACF field "Page link"? Or does this only work for the WYSIWYG field for ACF?

November 15, 2024 at 8:16 pm #16409719

Andreas W.
Supporter

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

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

Any translaton engine will not know how to handle links in different languages and will not be able to translate links.

---

The "Page Link" field by default is set to "Copy" which means the link will not show up inside the WPML Translation Editor but the setting will be copied in the background when translating to make sure original and translation have similar settings.

As this is an internal link WPML should adjust it automatically once a translation exists.

If you use fields like text, textarea, or WYSIWYG and you would like them to get translate automatically, you need to set the fields to "Translate".

If you want to translate a Link field you need to set it to "Translate" and adjust the translation manually while searching for the link using the text field inside the Advanced Translation Editor.