 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.
|
 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.
|
 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?
|
 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.
|