Skip Navigation

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

Problem:
The client reported that ACF link fields inside a custom block were not translatable.
Solution:
First, we verified that the 'Test link 2' field's value was set to 'Translate'. We found that the URL value was indeed showing for the translation when searched for. We recommended the client to refer to our documentation on how to translate URLs, shortcodes, and HTML attributes using the Advanced Translation Editor:
https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Next, we resolved the issue by changing the field name of 'Button title' from 'button' to 'button_link', as 'button' or 'buttons' may be reserved words that could cause conflicts. Additionally, we upgraded to WPML version 4.6.9.

If this solution doesn't look relevant to your issue, please open a new support ticket.

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 13 replies, has 3 voices.

Last updated by Bigul 1 year ago.

Assisted by: Bigul.

Author Posts
January 10, 2024 at 1:55 pm

riencov

acf link fields inside custom block are not translatable

January 10, 2024 at 3:12 pm
January 11, 2024 at 10:16 am #15173308

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I received feedback from the 2nd tier and they mentioned the issue is escalated to our developers.

In the meantime, you can set the link fields type to translate and translate it from Advanced Translation Editor.

You will need to search for the URL in the Advanced Translation Editor and translate it.
https://wpml.org/documentation/translating-your-contents/advanced-translation-editor/

Let me know if this workaround helps.

Thanks

January 11, 2024 at 10:25 am #15173363

riencov

Thanks Shekhar,
We're already usingthe Advanced Translation Editor. Do we need to set the ACF Field group in 'expert mode'? And can we also translate the link title in this case?

January 11, 2024 at 11:42 am #15174003

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, in expert mode, set the field preferences to translate. and you should be able to translate the labels too.

Let me know if this helps.

Thanks

January 11, 2024 at 11:52 am #15174144

riencov

Unfortunately this doesn't work. When i change it here:
url: hidden link
admin page: hidden link

I changed the link button to 'translate' in expert mode and changed the title of the button, but it doesn't show up in the advanced translation editor. I also tried searching in the searchbar, but it didn't help.

January 11, 2024 at 1:19 pm #15174739

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I have created similar test site here and created a block "Testimonials" with link and it works without any issues here, hidden link

Being so, it looks like a theme or plugin compatibility issue on your end, Have you tried disabling all non-WPML plugins, switching to one of the default themes, and checking whether the issue still persists or not?

Please remember to create a backup of your site (both files and the database) before making any updates or changes. This is always a good practice.

Look forward to your reply.

Thanks

January 11, 2024 at 2:59 pm #15175316

riencov

I created a staging environment at hidden link and disabled all of the unused plugins + switched to the twenty24 theme. I also removed the translated page and added a fresh "Hero" block, but neither of these gave me the solution.

January 11, 2024 at 3:49 pm #15175728

riencov

When i'm creating a new Field Group with a Link inside of it, and connect it to the (for example) block Hero, it works. But the original link Button is still not translatable.

January 12, 2024 at 10:37 am #15178324

Bigul
Supporter

Languages: English (English )

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

Hello,

I am Bigul from the WPML support team. Shekhar is off today. So I am taking care of this ticket and hope it will be okay for you.

Thank you for the updates. It would be great if you could share the new staging site credentials with us - hidden link. It will help us a lot in debugging.

Also, please share the link of the post having the following fields.

When I'm creating a new Field Group with a Link inside of it, and connecting it to the (for example) block Hero, it works. But the original link Button is still not translatable.

--
Thanks!

Bigul

January 12, 2024 at 10:49 am
January 12, 2024 at 4:48 pm #15180249

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the details and login information. We would like to do a few tests on the staging site. Hope it will be okay for you. Please let us know your feedback.

--
Thanks!

Bigul

January 15, 2024 at 7:30 am #15183170

riencov

Sure, you're good to go!

January 15, 2024 at 7:27 pm #15186795

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates and permission. The *Test link 2* field's value is set as *Translate*. The URL value is showing for the translation when I search for it. Refer to the following documentation for more details.

https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Please check the attached images for more details and let us know your feedback.

--
Thanks!

Bigul

2024-01-16_00h37_57.png
2024-01-16_00h34_51.png
2024-01-16_00h33_13.png
January 16, 2024 at 10:08 am #15188886

riencov

I know the 'test 2' link is working. It's about the original test button. You can find it in ACF Field group 'Blok - Hero' -> 'Button title' (id 'button'). This one is not translating, even not when creating a new page and it's also set to 'translate'.

I created a test page: hidden link