Skip Navigation

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

Problem:
You are updating text and links in the WPML string translation page on your website, but while the text updates correctly across different languages, the links do not. Specifically, the French link still appears on the English and Thai pages.
Solution:
We identified that the issue was due to the top bar section coming from Elements custom post type using custom Gutenberg elements, which were not fully compatible with WPML Translation Editor. Here are the steps we took to resolve this:
1. We added the following XML configuration in WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="generateblocks/container" translate="1" label="Container link">
    <key name="url"></key>
    </gutenberg-block>
    <gutenberg-block type="generateblocks/headline" translate="1" label="Headline link translation">
     <xpath>//span[@class="gb-headline-text"]/a</xpath>
     <xpath type="link">//a/@href</xpath>
   </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

2. We opened the Topbar post in Edit mode in the default language and made a minor change (added a space in post title) to reload the translation.
3. We then opened the secondary language posts in Advanced Translation Editor and added the link translation.
For more details, you can refer to these documents:

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, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.

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.

Tagged: ,

This topic contains 6 replies, has 2 voices.

Last updated by orrog 1 year ago.

Assisted by: Noman.

Author Posts
May 20, 2024 at 9:25 am #15644356

orrog

Background of the issue:
I am working on updating the text and link in the string translation page of WPML on my website hidden link. I need the changes to reflect correctly in multiple languages.

Symptoms:
After changing the text and link in the string translation page, the text updates correctly across different language pages, but the link does not update. The French link still appears on the English and Thai pages.

Questions:
Why does the updated link not appear correctly on the English and Thai pages after making changes in the WPML string translation page?
How can I ensure that the link updates correctly across all language versions on my site?

May 20, 2024 at 10:12 am #15644703

orrog

it's same

May 20, 2024 at 10:36 am #15644978

Noman
WPML Supporter since 06/2016

Languages: English (English )

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

Thanks for trying it. To take a closer look at this issue, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

Your next answer will be private, meaning only you and I can access it.

=== Please backup your database and website ===

✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.

Thank you

May 21, 2024 at 12:13 am #15647509

orrog

Hi,
you have an access now

May 21, 2024 at 6:52 am #15648105

Noman
WPML Supporter since 06/2016

Languages: English (English )

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

Thanks for providing the login details. I’m working on debugging this issue and will get back to you with an update soon.

Thank you for your cooperation

May 21, 2024 at 7:58 am #15648425

Noman
WPML Supporter since 06/2016

Languages: English (English )

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

I’ve noticed that the top bar section is coming from Elements custom post type which is using custom Gutenberg elements which seems not fully compatible with WPML Translation Editor that’s why you were facing this issue. I’ve followed the below steps to fix this issue:

1. Added the below XML:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="generateblocks/container" translate="1" label="Container link">
	<key name="url" />
    </gutenberg-block>
    <gutenberg-block type="generateblocks/headline" translate="1" label="Headline link translation">
	 <xpath>//span[@class="gb-headline-text"]/a</xpath>
	 <xpath type="link">//a/@href</xpath>
   </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

In WPML >> Settings > Custom XML Configuration section.

2. Opened the Topbar post in Edit mode in the default language:
hidden link and made a small change(added a space in post title) to reload the translation.

3. Opened the secondary language posts in Advanced Translation Editor and added the link translation; now it seems to be working correctly.

Here are docs for more details:
https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/
https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Could you please check and confirm?

Thank you

contact URL translation.png
top bar post translation.png
May 21, 2024 at 8:02 am #15648458

orrog

Yes, I confirm, it's ok now.
Thank you