Skip Navigation

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

Problem:
The client was trying to redirect a Kadence form submission to a translated 'Thank you' page, but it was redirecting to the original language URL despite the URL being translated.
Solution:
We reviewed the Form block and confirmed that the Translation support for the Redirect field was correctly implemented. To fix the issue, we modified the link in the Redirect field on the Czech page to a relative format. After saving the changes and updating the English translation, the redirect started to work properly on the English version of the page.
If you're experiencing a similar issue, we recommend you try updating the redirect link to a relative format and then updating your translations.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the issue persists, 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 you still need assistance, 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 Prosenjit Barman 11 months, 2 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
March 14, 2024 at 9:42 am #15408496

Lukas Cech

I am trying to: Redirect a Kadence form after submitting to a translated Thank you page

Link to a page where the issue can be seen: hidden link

I expected to see: redirect to: hidden link

Instead, I got:
it redirects to the original CZ url: hidden link
Despite the URL being translated in ATE, see image.

2024-03-14_10-38.jpeg
March 14, 2024 at 12:30 pm #15409806

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I've checked the form and it seems the link may not have been accurately translated in the Translation Editor, which is causing issues in the English version. Could you kindly translate the link as outlined in the guide provided below and verify if the issue persists?

- https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/#how-can-i-translate-urls-in-the-advanced-translation-editor

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

March 14, 2024 at 4:26 pm #15411530

Lukas Cech

Hi Prosenjit,

that's exactly how I translated the link:
1. opened ATE
2. searched for the entire link (or it's part) in the search bar
3. translated the URL in the translation field
4. Saved (checkbox button)
5. Completed the translation

You can see in my image hidden link that it is translated that way.

March 15, 2024 at 5:49 am #15412703

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

Since the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

March 19, 2024 at 4:30 am #15424027

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi,

Thank you for sharing the login information.

I reviewed the Form block and can confirm that the Translation support for the Redirect field was correctly implemented. Since the redirect function wasn't working properly in other languages, I modified the link in the Redirect field on the Czech page and updated it to relative format (as shown in this screenshot: hidden link). Upon saving the changes and updating the English translation, the redirect began to work properly on the English version of the page.

Please check now and inform me if there's anything else you need assistance with. I'm here to help and would be glad to do so.

Best regards,
Prosenjit

March 19, 2024 at 9:28 am #15424959

Lukas Cech

Hi Prosenjit,

thank you for the creative fix. Although it does fix this specific problem, it doesn't feel like a good long term solution.

no one ever will enter the URL of the page like you indicate"dekujeme/". Every URL starts with a slash /dekujeme/.

Plus, the only reason why this works is that WordPress recognizes the slug and redirects automatically, but your input creates an incorrect URL: hidden link - such URL doesn't exist.
hidden link
The system (luckily) redirects to hidden link, but that's just a lucky coincidence, not a fix to the problem.

Also, I have two pages with the slug "dekujeme", but with a different full URL:
/cs/rezervace/dekujeme/
/cs/kontakt/dekujeme/

They serve a different purpose - I can change the slug of one page to make sure they don't get mixed up, but again, everyone else using the Kadence form on their website with WPML will definitely not know that.

I think the correct fix should be to ensure that any form of URL will be used and translated correctly. Especially the one that is offered in the dropdown by the block itself when you type in the name of the page.

Lukas

March 20, 2024 at 4:59 am #15429384

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi Lucas,

Thank you very much for your insightful feedback. Your concerns regarding the long-term viability of the suggested solution, the use of relative URLs, and the handling of identical slugs are well-taken and appreciated.

I understand your point about the conventional format of URLs starting with a slash, However, given that your site's Home URL concludes with a slash, I did not add an additional slash to the start of the relative URL to maintain consistency in the site's URL structure.

Regarding the URL format displayed in the backend (`hidden link`), it's due to the nature of the relative format. When you add "/dekujeme-za-kontakt/" to the link field, the URL will be relative to the current page, which is why you see "hidden link". In the frontend, it appears correctly because it's relative to the base site URL. Therefore, it is not a coincidence, it is how the relative URL format works.

Kindly be informed that it does not impact the front-end user experience or SEO. Relative URLs are a common practice in web development for maintaining link integrity. They are interpreted by the web server relative to the current URL, which is why the system can understand and direct them appropriately.

However, your point about the potential confusion this might cause, especially with multiple pages sharing a similar slug but serving different purposes, is very valid. However, it is important to know that WordPress doesn't support identical slugs. It is recommended to have a unique slug for each page, post, taxonomy, or custom post type to avoid conflicts and confusion. This not only helps in maintaining a clear URL structure but also improves SEO and user navigation.

Moving forward, it's important to note that WPML is capable of recognizing both absolute and relative URL formats. However, when inputting URLs into a custom field, the relative format is generally more advisable. This is because WPML can seamlessly identify and appropriately adjust relative URLs for the site's different language versions.

I hope you can understand. Thank you once again for your valuable feedback. Please feel free to let me know if there is anything else you need help with. I'll be happy to assist.

Best regards,
Prosenjit

March 20, 2024 at 9:45 am #15430180

Lukas Cech

Hi Prosenjit,

well, I guess we have to leave it at that.

Thanks for the fix and help!

Lukas