[Resolved] acf link fields inside custom block are not translatable
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.
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?
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.
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.
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.
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.
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.
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.
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.
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'.