[Resolved] Wordpress translation editor makes a mess of translated buttons
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:
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.
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?
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.
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.
...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.
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.
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.
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
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
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.