Skip Navigation

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

Problem:
You are using WPML's automatic translation for a custom Gutenberg block called 'Blog - box' which includes an ACF Group with fields like headline, txt, and link. In the expert translate mode, the 'headline' field, set to 'translate', does not appear in the Advanced Translation Editor (ATE), although the 'link' field does.
Solution:
We resolved the issue by modifying the WPML configuration XML. The problem was related to an encoding attribute which, when removed, allowed the 'headline' field to appear in the ATE. Here is the corrected code you should use:

<wpml-config><br />  <gutenberg-blocks><br />    <gutenberg-block type="acf/blog-box" translate="1"><br />      <key name="data"><br />        <key name="headline"></key><br />        </key><key name="link"><br />          <key name="title"></key><br />        </key><br />        <key name="txt"></key><br />      <br />    </gutenberg-block><br />  </gutenberg-blocks><br /></wpml-config>

If this solution does not resolve your issue, or if it seems outdated or irrelevant 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. If you still need assistance, please open a new support ticket at WPML 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 0 reply, has 0 voices.

Last updated by Bruno Kos 3 months, 2 weeks ago.

Assisted by: Bruno Kos.

Author Posts
March 12, 2025 at 8:23 am #16805417

Mirosław Tarasiewicz

Background of the issue:
I am trying to use WPML automatic translation for a custom Gutenberg block called 'Blog - box' which has an ACF Group with fields like headline, txt, and link. I am using the expert translate mode and have set the 'headline' field to 'translate', but it does not appear in the Advanced Translation Editor. The 'link' field, also set to 'translate', does appear. I have tried changing the field to 'Copy once', updating the post with a title change, and clearing the cache, but it didn't work. Previously, using the classic WordPress editor for translations, I had no issues. Here are the screenshots: hidden link

Symptoms:
The 'headline' field set to 'translate' does not appear in the Advanced Translation Editor, while the 'link' field does.

Questions:
Why does the 'headline' field not appear in the Advanced Translation Editor despite being set to 'translate'?
What steps can I take to ensure all fields appear in the Advanced Translation Editor?

March 12, 2025 at 8:54 am #16805760

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

If you try adding this block to a new page and try translating it, does it show in the translation editor?

March 12, 2025 at 9:03 am #16805777

Mirosław Tarasiewicz

I created a new page, added the block and still only link show up.

22.png
11.png
March 12, 2025 at 10:41 am #16806380

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you try this?

1. **Inspect the Block in WordPress Editor:**
- Add the block to a post.
- Switch to **Code Editor** (top-right options menu > "Code editor").
- Copy the block's raw HTML.

2. **Create the XML for WPML Translation:**
- Refer to the guide: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/#registering-gutenberg.
- Register your block following the XML structure provided in the documentation.

Let me know how it goes!

March 13, 2025 at 12:29 pm #16811822

Mirosław Tarasiewicz

1.
<!-- wp:acf/blog-box {"name":"acf/blog-box","data":{"headline":"Zobacz więcej inspiracji na naszym Instagramie! ","_headline":"field_6315ae5eaea9f","headline_id":"","_headline_id":"field_64a6b2af920f0","txt":"test","_txt":"field_6315ae6caeaa0","link":{"title":"Instagram Mardom Decor","url":"hidden link","target":"_blank"},"_link":"field_6315ae79aeaa1","acf_block_options_id":"","_acf_block_options_id":"field_5fc5f10200985","acf_block_options_additionalClass":"","_acf_block_options_additionalClass":"field_5fc5f0bb00984","acf_block_options_margin_top":"0","_acf_block_options_margin_top":"field_5fc6139755ce7","acf_block_options_margin_bottom":"0","_acf_block_options_margin_bottom":"field_5fc613ed55ce8","acf_block_options_padding_header":"0","_acf_block_options_padding_header":"field_5fc61aba7bede"},"mode":"edit"} /-->

2. Blog box appears in our site a lot of times, so It would take too much time to register it everytime.

March 13, 2025 at 2:08 pm #16812324

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

What if you try this?

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="acf/blog-box" translate="1">
      <key name="data" encoding="json">
        <key name="headline" />
        <key name="link">
          <key name="title" />
        </key>
        <key name="txt" />
      </key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Add it like this:
https://wpml.org/documentation/support/language-configuration-files/#setting-translation-options-for-third-party-themes-and-plugins

And after this open any original page where such box is used, update it (just resave it) and open in the translation editor.

Does it show?

March 14, 2025 at 10:38 am #16815917

Mirosław Tarasiewicz

Sadly, It didn't help. As You said I tried it with existing block and it didn't work, and also I created new page, added block and even then I cant translate this fields.

March 14, 2025 at 11:58 am #16816500

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Would you be willing to provide me with WordPress credentials so I could investigate the issue directly?

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

And please make a test page with this block only and send me this page URL so I could check.

I marked your next reply as private so that you can safely add credentials.

March 17, 2025 at 11:36 am #16824184

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

There seems to be a server protection in place, can you share logins for this as well?

March 17, 2025 at 12:40 pm #16824594

Mirosław Tarasiewicz

Mark my next message as private please.

March 17, 2025 at 1:18 pm #16825151

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Done.

March 18, 2025 at 7:27 am #16828172

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you check now?

hidden link

It shows in ATE now.

This code worked - the issue was that we had encoding attribute and when removed, it works:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="acf/blog-box" translate="1">
      <key name="data">
        <key name="headline" />
        <key name="link">
          <key name="title" />
        </key>
        <key name="txt" />
      </key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>