Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 33 replies, has 1 voice.

Last updated by Andreas W. 8 hours, 36 minutes ago.

Assisted by: Andreas W..

Author Posts
April 29, 2026 at 9:13 am #18002126

kristoferS-2

I was also not able to reproduce in the sandbox. Do you want to check my staging site that I shared private information about before?

I understand that XML config is needed for ID. What I struggle to understand why - in my case XML config for HREF was also needed. Without it, anchor links in the affected translation would be reverted when original had a minor style change.

April 29, 2026 at 9:27 am #18002150

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

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

I do have access to your staging site and created a test post with a standard Gutenberg Heading and Button, and can confirm the issue here:

The problem is, if you use this config, you overwrite the default config for the Gutenberg Heading:

<gutenberg-block type="core/heading" translate="1">
      <xpath>//h2</xpath>
      <xpath>//h2/@id</xpath>
      <xpath>//h3</xpath>
      <xpath>//h3/@id</xpath>
      <xpath>//h4</xpath>
      <xpath>//h4/@id</xpath>
      <xpath>//h5</xpath>
      <xpath>//h5/@id</xpath>
      <xpath>//h6</xpath>
      <xpath>//h6/@id</xpath>
    </gutenberg-block>

This config will only allow for translating text and IDs.

This is why links are no longer translatable.

April 29, 2026 at 11:45 am #18002707

kristoferS-2

Not sure I follow. Do you mean that a `<gutenberg-block type="core/heading" translate="1">` will affect how the `core/button` block is handled? What about links in text content like paragraph blocks?

April 29, 2026 at 9:18 pm #18004107

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch )

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

I suspect that since you added a custom config, it will overwrite the default config and default behavior for how WPML handles the Gutenberg Block.

If you want to keep translating links, then your custom config needs to cover them.

Example:

<gutenberg-block type="core/heading" translate="1">
      <xpath>//h2</xpath>
      <xpath>//h2/@id</xpath>
      <xpath>//h2//a</xpath>
      <xpath>//h2//a/@href</xpath>
      <xpath>//h3</xpath>
      <xpath>//h3/@id</xpath>
      <xpath>//h3//a</xpath>
      <xpath>//h3//a/@href</xpath>
      <xpath>//h4</xpath>
      <xpath>//h4/@id</xpath>
      <xpath>//h4//a</xpath>
      <xpath>//h4//a/@href</xpath>
      <xpath>//h5</xpath>
      <xpath>//h5/@id</xpath>
      <xpath>//h5//a</xpath>
      <xpath>//h5//a/@href</xpath>
      <xpath>//h6</xpath>
      <xpath>//h6/@id</xpath>
      <xpath>//h6//a</xpath>
      <xpath>//h6//a/@href</xpath>
    </gutenberg-block>

Please give this a test and let me know if further assistance is needed.