Skip Navigation

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

Problem:
The client is trying to translate a block pattern with two buttons using Kadence Blocks in WPML. While the text strings are translatable, the URLs for the buttons in the translated version do not appear editable, leading to incorrect URL encoding and a 500 error on the target page.
Solution:
We recommend the following steps to resolve the issue:
1) Ensure you have a full site backup before making changes.
2) Navigate to WPML>>Settings>>Custom XML Configuration and update the WPML language configuration as follows:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/advancedheading" translate="1" label="Kadence: Advanced Heading">
      <key name="link"></key>
    </gutenberg-block>
    <gutenberg-block type="kadence/singlebtn" translate="1" label="Kadence: Buttons">
      <key name="text"></key>
      <key name="link"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

3) Go to *****/wp-admin/edit.php?post_type=wp_block&lang=en
4) Edit the *Registration Block* post, make a minor change to refresh the translation settings, and update it.
5) Open the French translation for editing and adjust the URLs as needed.

If this solution does not resolve your issue or seems outdated, please check the related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance 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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Bigul 4 months ago.

Assisted by: Bigul.

Author Posts
August 29, 2024 at 10:16 pm #16122342

chrisL-17

Background of the issue:
I am trying to translate a block pattern that has two buttons generated using Kadence Blocks' button blocks. I am able to translate the text strings in the block pattern but when I am translating the buttons I do not see anywhere to edit the URLs so that the translated button's URL is in French. Link to a page where the issue can be seen: hidden link

Symptoms:
The button's URL has ampersands translated into hex codes, causing the receiving server to return a 500 error because it needs the ampersands to separate the GET variables. I expected to click the 'Resident-es de l'Ontario' button and go to a page where I can register in French. Instead, I got a 500 internal server error.

Questions:
How can I edit the URLs of translated buttons in Kadence Blocks?
How can I prevent ampersands in URLs from being translated into hex codes?

August 31, 2024 at 4:26 pm #16127943

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

We hope you use WPML Advanced Translation Editor to translate posts and pages.

If so, please open the page translation (hidden link) for editing in WPML Advanced Translation Editor. Then search for "HTTP" or "/" and make sure the URLs are showing for translation.

If you are still facing the problem, please fill in the private details fields after a full site backup{mandatory}. I would like to access the admin area of your site to check further. Refer to the following links for more details about our private information sharing policies.

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

hidden link

--
Thanks!

Bigul

September 2, 2024 at 12:06 pm #16131521

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the details and login information. It will be related to the following ticket. Please try the workaround suggested there after a site backup and make sure the issue exists or not.

https://wpml.org/forums/topic/internal-links-do-not-point-tothe-translated-pages/page/2/#post-14982377

--
Thanks!

Bigul

September 5, 2024 at 4:24 pm #16145978

chrisL-17

No joy.

I added this to my WPML custom XML config:

<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="kadence/advancedheading" translate="1" label="Kadence: Advanced Heading">
<key name="link" />
</gutenberg-block>
<gutenberg-block type="kadence/singlebtn" translate="1" label="Kadence: Buttons">
<key name="link" />
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>

...and where before the translation editor could at least translate the button text, now it doesn't see the button at all.

This does seem like a pretty huge gap in the Advanced Translation Editor. I hope your people are working on making it easier to properly translate blocks.

September 6, 2024 at 11:58 am #16148843

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. Please take a site backup, I would like to do a few tests on the site to troubleshoot the issue.

Also, please share the FTP credentials to access the site.

--
Thanks!

Bigul

September 9, 2024 at 4:16 pm #16157770

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. However, I am not able to login to the FTP. It shows the following error. Please check. It is a must for further debugging of this issue.

Status:	Waiting to retry...
Status:	Connecting to n*****.ca...
Response:	fzSftp started, protocol_version=11
Command:	open "w*****@n*****@n*****.ca" 22
Error:	Connection timed out after 20 seconds of inactivity
Error:	Could not connect to server

Otherwise please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server. So we can troubleshoot the bug without affecting your live site.

Sorry for the late response because of the weekend.

--
Thanks!

Bigul

September 9, 2024 at 4:28 pm #16157807

chrisL-17

If FTP doesn't work for you I have installed Duplicator and you can make and download an image for local testing.

Whatever works best for you.

cmkl

September 9, 2024 at 5:07 pm #16158110

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. I can access it with the new credentials. But for the easiness, I made a copy of the site, will debug it further locally, and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

September 10, 2024 at 3:34 pm #16162647

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

After the following steps, I am getting the expected results in my local copy. Please try it after a full site backup and let us know your feedback. Refer to the attached images for more details.

1) Visit WPML>>Settings>>Custom XML Configuration
2) Update the WPML language configuration like the following

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="kadence/advancedheading" translate="1" label="Kadence: Advanced Heading">
      <key name="link" />
    </gutenberg-block>
    <gutenberg-block type="kadence/singlebtn" translate="1" label="Kadence: Buttons">
      <key name="text" />
      <key name="link" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

3) Visit hidden link
4) Open the *Registration Block* post for edit
5) Make a minor change the post to refresh the translation settings and update it
6) Open the French translation to edit and search for the URLs

--
Thanks!

Bigul

2024-09-10_20h29_28.png
2024-09-10_20h28_38.png
September 10, 2024 at 3:51 pm #16162698

chrisL-17

Yes! That does it. Still think WPML needs a more user-friendly approach to making blocks translatable but I imagine that's a huge project. Thank you for your help.