Home›Support›English Support›[Resolved] Automatic translations translates acf fields that were set to copy
[Resolved] Automatic translations translates acf fields that were set to copy
This thread is resolved. Here is a description of the problem and solution.
Problem: You are using WPML's 'Automatic Translation' feature to translate a page with a complex hierarchy of ACF clone fields set to 'copy only'. Despite this setting, fields such as padding top, padding bottom, and bg are being translated, which should not occur and is causing the site's layout to break. Solution: We recommend ensuring that each field name used in your ACF fields is unique. Using the same field name more than once can lead to issues where field values are incorrectly handled in the WPML Translation Editor. You can achieve uniqueness by adding a prefix to your field names, such as the group name. For more detailed guidance, please refer to our documentation on translating sites built with ACF.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, 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. Should you need further assistance, please do not hesitate to open a new support ticket at our 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.
Background of the issue:
I am trying to translate a page using WPML's 'Automatic Translation' feature. I have a complex hierarchy of ACF clone fields, all set to 'copy only'. The hierarchy is as follows:
Content Stats (ACF Field Group) (Expert)
- Extras (Clone Field of Global Extras) (Copy only)
Global Extras (Expert)
- BG (Clone field of Global BG) (Copy only)
- Paddings (Clone field of Global Paddings) (Copy only)
Global BG (Expert)
- BG (Button Group) (Copy only)
Global Paddings (Expert)
- Padding top (Button Group) (Copy only)
- Padding bottom (Button Group) (Copy only).
Symptoms:
When using 'Automatic Translation', the padding top, padding bottom, and bg values are being translated, which should not happen, causing the site's layout to break.
Questions:
Can anyone test the issue on their end and see what I'm talking about?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
The link field by default will be set to "Copy" but you can set it to "Translate" and should be able to translate link text and link URL.
If you do not need to translate the link fields, please try the field group setting "Same fields across languages" which will auto-configure the field group for translation with the WPML Translation Editor.
Also, make sure that the ACF Field Group at set to "Not translatable" inside the WPML Settings Page at "Post Type Translation" and make sure to delete any duplicated groups.
If this does not solve the issue, please let me know and I can offer to take a closer look at the site.
Have you gotten the chance to take a look at the screenshots i sent? The ACF CTA fields are just a side question of mine, the main issue is still the clone fields. You seem to have overlooked it in your recent reply.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hi,
About:
"When using 'Automatic Translation', the padding-top, padding-bottom, and bg values are being translated, which should not happen, causing the site's layout to break."
This surely should not happen. This would only be the case if the fields are set to "Translate".
Anyhow, I see you use a Button Group with Choices and it might be that those choices were made available on the WPML Translation Editor. This usually would be expected even if the select field is set to "Copy".
You can adjust the translation of those strings at WPML > String Translation.
Can you give this a try, please?
Also, to avoid such issues in the future, you can use the Glossary Feature of the Advanced Translation Editor. You can define "Names" which should never be translated automatically.
So i managed to sort out the issue about the clone fields that WPML forcefully translates even when i've already specified to copy only by following your suggestion to make use of the glossary. This is definitely a bug though.
Speaking of bug, i think I just found another one.
I'm not sure if I'm supposed to create a new ticket for this one but your site says I will end up being prioritized less if i have a lot of tickets so I'll just mix it in here?
Here it goes.
I've noticed that a link inside a repeater that was set to copy with a link field inside that was set to translate isn't translating at all.
Weirdly enough only the link fields inside repeater fields aren't translating. Text and Textarea fields inside do get translated.
If you check the screenshot the button text remains in "English" its not translating to German.
What do you think is the problem? It's not showing in the ATE too.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
The link field is by default set to "Copy" if you use the mode "Same fields across languages". You need to change the field group to "Expert" and then set the Link field to "Translate".
After that, edit the Link field on the original content, save the page or post and open the WPML Translation Editor.
---
About the issue with Choices being translated automatically if the field is set to "Copy" or the field group is set to "Same fields across languages" I can not confirm such an issue on the new test site using the latest versions of our plugins.
It might have been the case, that you had this field earlier set to "Translate" and a translation was already saved in translation memory.
Could you please import your ACF Field Groups on the following test site and try to recreate the issue?
Hello, I have tried deleting the german language, removing the .mo and .po files, as well as going to settings > troubleshoot > reset wpml so i can have a fresh start of the data but still it didn't work.
Have you taken a look at the screenshot i sent? The field was already set to translate on expert mode and i also did try to edit the link text of the said field but no matter how many times i run the automatic translation it doesn't get translated at all.
TLDR: Link field's text inside a repeater (copy) that were set to translate doesn't get translated with the automatic translation.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hi,
I would like to offer to take a closer look and 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 make 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.
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.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
It looks like these fields are showing up inside the translation editor as they were already translated and those segments are now saved inside the Translation Memory of the Advanced Translation Editor.
I can offer to reset the translation memory for this site, if you wish?
Hello, can you walk me through what that means? And if doing that will solve the issue? If doing so then yes. Could you also tell me how to do that myself?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Every time you complete a translation for a segment on the Advanced Translation Editor, the translation will be saved inside a translation memory. This translation memory protects you from translation loss and at the same time auto-completes any similar segments on all contents of your website.
Once you edit the original content, the affected segment will be deleted and the translation memory will be deleted.
At the moment there are only 47 entries inside the translation memory of your staging site on our system. I can offer to delete this memory and then run another translation test to see if the fields will still show up inside the WPML Translation Editor.