Skip Navigation

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:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="wp-bootstrap-blocks/button" translate="1">
      <xpath>//div/a</xpath>
      <key name="text"></key>
      <xpath type="link">//div/a/@href</xpath>
      <key name="url"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

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.

This topic contains 20 replies, has 3 voices.

Last updated by peterR-59 7 months, 1 week ago.

Assisted by: Andreas W..

Author Posts
April 16, 2024 at 12:18 pm #15525089

peterR-59

Hi there,

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

Cheers,
Peter Rees

Screenshot 2024-04-16 at 9.27.27 pm.png
Screenshot 2024-04-16 at 9.33.18 pm.png
Screenshot 2024-04-16 at 9.45.20 pm.png
April 16, 2024 at 12:59 pm #15525491

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

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:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

- Update WPML plugins to the latest versions.
- Also update all other plugins specially ACF's to the latest versions if needed.

Then check the following guides:

- ACF and Field Settings: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/
- Finding URLs and Text in ATE: https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Regards.

April 16, 2024 at 1:21 pm #15525657

peterR-59

Thanks Waqas,

Plugins are now up to date and memory limits increased.

I've also tried the searchbox in the Advanced Translation Editor to locate the missing fields but to no avail.

Look forward to your reply.

Cheers,
Peter

April 17, 2024 at 1:49 am #15528745

Andreas W.
Supporter

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.

Guide:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#setting-field-group-translation-option

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.

If this will not solve the issue, let me know.

Best regards
Andreas

April 17, 2024 at 3:03 am #15528854

peterR-59

Hi Andreas,

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.

Cheers,
Peter

Screenshot 2024-04-17 at 12.01.13 pm.png
Screenshot 2024-04-17 at 12.12.19 pm.png
Screenshot 2024-04-17 at 12.20.50 pm.png
April 17, 2024 at 3:06 am #15528898

Andreas W.
Supporter

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.

April 17, 2024 at 5:03 am #15529012

Andreas W.
Supporter

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.

April 17, 2024 at 5:31 am #15529040

peterR-59

Thanks Andreas,

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.

Cheers,
Peter

April 17, 2024 at 5:38 am #15529048

Andreas W.
Supporter

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

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

I made an edit to almost all the fields, saved the original homepage and now I can see the content on ATE.

See screenshot.

Captura de pantalla 2024-04-17 003731.png
April 17, 2024 at 5:56 am #15529174

peterR-59

The Advanced Translation Editor isn't currently loading in Chrome for me but seems to work in Safari for some reason.

Unfortunately, many fields are still missing for translation such as:

- Hero H1 heading text
- Hero Learn More link text & URL
- Link text & URL for menu block
- Link text & URL for blue button in grey box

Also, only a couple of my field groups appear in Settings > Custom Fields translation - shouldn't they all be listed here?

Screenshot 2024-04-17 at 3.45.11 pm.png
Screenshot-2024-04-17-at-3.47.36-pm.jpg
April 17, 2024 at 4:38 pm #15534100

Andreas W.
Supporter

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

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

1) At WPML > Translation Management > Dashboard make sure to select "Patterns" as the post type and translate them. (I did this already)

2) On the original homepage, please edit the contents that are not appearing on the translation editor and save the page again. (I did this too now)

Remaining problems:

On the "CTA Block" the button text appears not yet to be translatable.

The Heading and Link of the "Hero Video Banner Block also are not yet translatable.

These blocks appear to be custom blocks. Each custom block needs a proper custom XML config to be translatable with the WPML Translation Editor.

Guide:
https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Let me know if you have questions about this guide or if you need help with creating such configs.

April 18, 2024 at 9:44 am #15536881

peterR-59

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.

Cheers,
Peter

April 18, 2024 at 12:25 pm #15538507

peterR-59

Hi Andreas,

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?

Cheers,
Peter

Screenshot 2024-04-18 at 10.28.40 pm.png
Screenshot 2024-04-18 at 6.04.11 pm.png
April 18, 2024 at 7:16 pm #15540914

Andreas W.
Supporter

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.

Source: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#using-same-fields-across-languages

Best regards
Andreas

April 19, 2024 at 2:23 am #15541565

peterR-59

Hi Andreas, I've now updated all of the field names to be unique but the link text & URL still don't appear for translation.

Cheers,
Peter

Screenshot 2024-04-19 at 11.52.44 am.png