[Resolved] ACF Block fields not appearing in Advanced Translation Editor
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was unable to translate certain fields from ACF blocks in the Advanced Translation Editor, such as link text and URLs. Additionally, most ACF blocks were not appearing in the Custom Fields Translation settings.
Solution: 1) We recommended increasing the WP Memory limit to 256M by adding the following code to the wp-config.php file:
define('WP_MEMORY_LIMIT', '256M');
2) We advised ensuring that "ACF Field Groups" are set to "Not translate" in WPML > Settings > Post Type Translation. 3) We suggested verifying that the ACF Field Group uses the translation preference setting "Same fields across languages". Guide 4) We instructed the client to edit the fields on the original content and then open the WPML Translation Editor again. 5) We identified that field groups with the same field names were causing issues and recommended making each field name unique. Source 6) We changed the translation preference for the Link field to "translate" and explained that external links usually need to be searched using the text search input in ATE. Default setting for Links 7) We provided instructions on creating a custom XML config and placing it in the root folder of the theme or plugin responsible for the block, or adding it at WPML > Settings > Custom XML Config. Guide 8) We provided an example of a custom XML config for translating a button's text and link:
If the solution provided here is not relevant to your case, either because it's outdated or not applicable, 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 you still need assistance, please 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.
I'm creating a Spanish version of a site and have been translating menus and basic page content without any issue.
However, in the Advanced Translation Editor, only some of the fields from my ACF blocks appear for translation. For example, only the 'Class' field of my ACF (repeater) menu block is shown but I actually want to translate the link text and URLs (link array).
I've tried reinstalling the plugin as well as making small text edits to the page, saving and going back into the Advanced Translation Editor but the ACF block fields are still missing.
Also, almost none of my ACF blocks appear in Settings > Custom Fields Translation so I can't toggle the 'Copy' or 'Translate' radio button options.
Happy to give access to the staging site for troubleshooting hidden link
Meanwhile this ticket is attended by one of my colleagues, I'll recommend a few fixes and then check a couple of guides:
IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.
- Fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello Peter,
1)Could you please increase your WP Memory limit to 256M? 128M is the minimum required by WPML.
Your current values are:
PHP Memory Limit 2G
WP Memory Limit 40M
Add this code to your wp-config.php to increase WP memory:
define('WP_MEMORY_LIMIT', '256M');
Paste it just before:
/ That's all, stop editing! Happy blogging. /
Now, verify the current settings at WPML > Support > WordPress. Then complete the translation again.
These settings can be limited directly by your hosting provider, so I recommend you contact and ask them to modify them directly.
If you can get even higher values It would be great.
https://wpml.org/home/minimum-requirements/
Note: WPML needs a minimum WP Memory limit of 128M to work only under a minimal environment, which means, with a default theme and no other plugins installed.
2) Please verify that on WPML > Settings > Post Type Translation the "ACF Field Groups" are set to "Not translate".
3) Verify that your ACF Field Group is using the translation preference setting "Same fields across languages". This setting will automatically set the translation preference for each field.
Now, edit the fields on the original content and open the WPML Translation Editor again. If the fields are appearing complete the translation to 100% and verify if it worked as expected.
I've updated the memory limits and verified everything as per your instructions - now when I go to open the Advanced Translation editor it just seems to time out.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.
You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.
IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.
The private response form looks like this: hidden link
Next time you reply, click "I still need assistance."
Video: hidden link
Please note that we are obliged to request this information individually on each ticket. We may not access any access information 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)
At ACF > Field Groups some groups are still missing the translation preference setting.
Please set all groups to "Same fields across languages" and then test again after editing the fields on the original homepage and saving the homepage again.
I've now set all field groups to "Same fields across languages" and edited fields on the Home page - unfortunately the Advanced Translation Editor is still timing out when attempting to translate.
Thanks Andreas, I've now added a wpml-config.xml file in the theme folder.
If you can assist with creating an initial config for one of the custom ACF blocks and the Bootstrap Button block (https://wordpress.org/plugins/wp-bootstrap-blocks/) that should hopefully get me on my way.
Strangely, when I tested on a fresh install of my WordPress framework, everything in the Hero Video Banner block was translatable without any XML config (see attached).
This included the link text & URL which appeared for translation by searching 'http' in the search box. However, after completing this initial translation, the link text & URL fields then disappeared from the Advanced Translation Editor and no longer showed up in the search results.
Perhaps part of the solution lies in finding the cause of this issue?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello Peter,
The reason for the issue appears to be that you have field groups that use the same field names, like here "heading" and "text".
Each field name in each field group needs to be unique in this case, otherwise the Advanced Translation Editor can not read them. Take note, that if you do not use Blocks you will even have issues displaying fields per PHP if various fields have the same name in different groups.
I suggest you adjust the field names and test again.