Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues with Gravity Forms where the confirmation translation only includes the URL field and ignores the URL parameter field, particularly when switching languages (e.g., from German to English), resulting in missing URL parameters in the redirection.
Solution:
We found that the issue is related to custom coding and the wp-force-login plugin. Specifically, the problem occurs in the

/wp-content/plugins/FHWPLoginRedirect/FHWPLoginRedirect.php

file within the

my_login_page

function, which incorrectly handles URL parameters during redirections for different languages. To resolve this, replace the existing function with the following code:

add_filter('login_url', 'my_login_page', 10, 3);<br />function my_login_page($login_url, $redirect, $force_reauth) {<br />    $request_redirect = '';<br />    if (isset($_GET['redirect_to']) && $_GET['redirect_to'] !== '') {<br />        $request_redirect = wp_unslash($_GET['redirect_to']);<br />    }<br />    $existing_redirect = '';<br />    $login_parts = wp_parse_url($login_url);<br />    if (!empty($login_parts['query'])) {<br />        parse_str($login_parts['query'], $q);<br />        if (!empty($q['redirect_to'])) {<br />            $existing_redirect = $q['redirect_to'];<br />        }<br />    }<br />    $target = $request_redirect ?: ($redirect ?: $existing_redirect);<br />    $target_path = '';<br />    if (!empty($target)) {<br />        $tp = wp_parse_url($target);<br />        $target_path = $tp['path'] ?? '';<br />    } else {<br />        $target_path = wp_parse_url($_SERVER['REQUEST_URI'] ?? '')['path'] ?? '';<br />    }<br />    $is_en = (strpos($target_path, '/en/') === 0)<br />        || (strpos($_SERVER['REQUEST_URI'] ?? '', '/en/') === 0);<br />    $base = $is_en ? home_url('/en/login-registration/') : home_url('/login/');<br />    if (empty($request_redirect) && !empty($target_path)) {<br />        if ($is_en && strpos($target_path, '/en/login-registration/') === 0) {<br />            return $base;<br />        }<br />        if (!$is_en && strpos($target_path, '/login/') === 0) {<br />            return $base;<br />        }<br />    }<br />    if (!empty($target)) {<br />        $base = add_query_arg('redirect_to', $target, $base);<br />    }<br />    if ($force_reauth) {<br />        $base = add_query_arg('reauth', '1', $base);<br />    }<br />    return $base;<br />}

Please implement this solution and verify if it resolves your issue. If this solution does not apply to your case or seems outdated, we recommend checking related known issues at https://wpml.org/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 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 31 replies, has 1 voice.

Last updated by einkaufZ 3 months, 1 week ago.

Assisted by: Osama Mersal.

Author Posts
December 17, 2025 at 3:17 pm #17671748

einkaufZ

Oh, you can open this test pages without being logged in too, I made a bypass code.

December 18, 2025 at 8:24 am #17673431

Osama Mersal

Hi Klaus,

Thanks for your update. I need your permission to install the Duplicator Pro plugin on your site to take a local copy of it.

After that, I'll consult our 2nd-tier support team regarding the issue.

Best regards,
Osama

December 18, 2025 at 9:40 am #17673792

einkaufZ

Hi Osama!

I installed Duplicator Pro with our license yet, so feel free to use it πŸ™‚

Thank you!

Kind regards,

Klaus πŸ™‚

December 18, 2025 at 1:01 pm #17674777

Osama Mersal

Hi Klaus,

Could you please download the package and send it to me? Whenever I tried to download it, I got a 403 Forbidden error.

Best regards,
Osama

December 18, 2025 at 1:42 pm #17674909

einkaufZ

Hi Osama!

Here you can download both files:
hidden link

Please tell me, when I can delete them, thank you!

Kind regards,

Klaus

December 18, 2025 at 2:53 pm #17675225

Osama Mersal

Hi Klaus,

Thanks for the package. I downloaded it and will check the issue and escalate if needed.

Please note that my response may be delayed due to the weekend.

Best regards,
Osama

December 18, 2025 at 3:08 pm #17675268

einkaufZ

Hi Osama!

Tomorrow is our last day, we are back on 07.01.2026.
Because we have holiday in the whole company for this period.

But maybe I can check my mails and maybe I will come to the office in the next days.

Thank you!

Kind regards,

Klaus πŸ™‚

December 21, 2025 at 11:51 am #17680492

Osama Mersal

Hi Klaus,

I couldn't reproduce the issue on the local copy or on the test page on your site. Kindly check this hidden link.

Could you please record a video of the issue and share it with our 2nd-tier support team?

Happy holidays! πŸ™‚

Best regards,
Osama

January 8, 2026 at 10:51 am #17712455

einkaufZ

Hello Osama!

We are back at work now πŸ™‚
Thank you for your holiday wishes!

Here is the video:
hidden link

In German, you can see, there is a querystring url param after the redirection after form submit.
In English, you can see, there is NO querystring url param after the redirection after form submit.

Kind regards,

Klaus πŸ™‚

January 11, 2026 at 9:52 am #17718862

Osama Mersal

Hi Klaus,

Sorry for the delayed reply due to the weekend. Thanks for the video. I've consulted our 2nd-tier support team and will update you as soon as I have an update.

Best regards,
Osama

January 12, 2026 at 10:58 am #17720959

Osama Mersal

Hi Klaus,

1) Would you please re-share the access details?

2) Please add the following code to your functions.php file.

add_filter( 'wpml_sl_blacklist_requests', 'custom_wpml_blacklist_urls', 10, 2 );

function custom_wpml_blacklist_urls( $blacklist, $sitepress ) {
	$blacklist[] = '<em><u>hidden link</u></em>';
	$blacklist[] = '<em><u>hidden link</u></em>';
	$blacklist[] = '<em><u>hidden link</u></em>';
	$blacklist[] = '<em><u>hidden link</u></em>';
return $blacklist;
}

After that, please make a minor edit to the form and re-translate it. Kindly let me know if the above code fixed the issue.

Best regards,
Osama

January 12, 2026 at 12:22 pm #17721368

Osama Mersal

Hi Klaus,

Thanks for the access details. Would you please let me know what you mean by "Looks good now, but is there a solution with the code in the functions file"?

Does that mean the provided workaround fixed the issue or not?

Thanks,
Osama

January 12, 2026 at 12:22 pm #17721369

einkaufZ

Hi Osama!
Oh no, it doesn't change anything, I was logged in, where it works.
But without being logged in, it is still there and I wrote the two wront links above:

Correct:
hidden link for German
hidden link for English

Kind regards,

Klaus

January 12, 2026 at 12:23 pm #17721372

einkaufZ

In English is still no url param there after the form submit.

Correct EN url: hidden link

January 12, 2026 at 1:29 pm #17721585

Osama Mersal

Hi,

Thanks for your update. I'll check with our 2nd-tier support team and update you as soon as I get an update.

Best regards,
Osama