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 1 month, 1 week ago.

Assisted by: Osama Mersal.

Author Posts
December 15, 2025 at 3:09 pm #17664868

einkaufZ

Hello!
We have a Gravity Forms form and everything looks fine in the translation editor, but for the confirmation translation, there is only the url field for the translation and the url param field is ignored.
So, with our default language German, the confirmation redirection with url params works fine.
But with another language, English for example, the redirection works for the url, but there are no url params then.
Please answer to webmaster@fh-joanneum.at, instead of einkauf.zit@fh-joanneum.at, thank you!
Kind regards,
Klaus Kral 🙂

December 16, 2025 at 9:21 am #17666621

einkaufZ

Hello!
Any news?
Kind regards,
Klaus

December 16, 2025 at 9:31 am #17666680

einkaufZ

FYI:
It doesn't matter, if the form is embedded with Elementor shortcode widget or with Essential Addons Gravity Forms widget.
It doesn't work neither.

Another information:
If I open the website while I am logged in, it works with German and English. And the url params are transmitted and the redirection works fine.
But if I am not logged in, it doesn't work in English.

Kind regards,

Klaus

December 16, 2025 at 1:02 pm #17667598

einkaufZ

I also tried to add that line in the custom-fields part of the wpml-config.xml:
<custom-field action="translate">_gform_setting_queryString</custom-field>

But that didn't change anything and I cannot find the field in the translation editor.

December 17, 2025 at 8:28 am #17670049

einkaufZ

Hello!
Any answers?
Kind regards,
Klaus

December 17, 2025 at 11:16 am #17670650

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Klaus,

I'm Osama from the WPML forums support team. I'll be glad to help you today.

First, apologies for the delayed response; it was due to a higher workload.

1) I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

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

❌ Please back up your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes, and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

2) I'm afraid we can't add another email to the reply because it's sent automatically via our system.

Best regards,
Osama

December 17, 2025 at 1:34 pm #17671168

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Klaus,

Thanks for the access details. Please log in to this hidden link">sandbox site and try to replicate the issue.

If the issue is replicable, please let me know how to reproduce it so that I can consult our compatibility team.

Note: The site has WPML and Gravity Forms installed.

Best regards,
Osama

December 17, 2025 at 2:03 pm #17671293

einkaufZ

Hello!

Can you give me more PHP memory please:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes)

Thank you!

Kind regards,

Klaus

December 17, 2025 at 2:12 pm #17671333

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Klaus,

I've increased the memory limit.

Best regards,
Osama

December 17, 2025 at 2:13 pm #17671340

einkaufZ

Thank you!

December 17, 2025 at 2:19 pm #17671375

einkaufZ

Ok, I don't know, what's the problem, but I cannot reproduce the problem on your site...
Bad bad bad...

December 17, 2025 at 2:41 pm #17671498

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I think you may need to install the "Magic Login Pro" plugin, which is used in Elementor to handle the step after form submission.

If you couldn't reproduce the issue, please let me know, and I'll take a local copy of your site to debug it without affecting your live site.

Best regards,
Osama

December 17, 2025 at 2:44 pm #17671504

einkaufZ

Hey!

We are using the Magic Login Pro plugin, it is installed and activated and works fine.

The problem is, that after form submission the confirmation redirection doesn't have an url param like "res=EL" or something like that.

If logged in, it works fine, if logged out, it just works in German.

I mean, I can change everything to be live, so that you can see it. But not for too long.

Kind regards,

Klaus 🙂

December 17, 2025 at 2:48 pm #17671616

einkaufZ

Oh, and the form submission is meant with that Gravity Forms form, not Magic Login Pro.
The login works fine, but I need the url params to show or hide widgets with Elementor.

December 17, 2025 at 3:17 pm #17671747

einkaufZ

I made new simple test pages with the form and there is the same problem:

hidden link for German

hidden link for English

As you can see, in German, the url after the redirection has an url param.
In English not.

Kind regards,

Klaus