Skip Navigation

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

Problem:
The client is experiencing a 'too many redirects' error when switching languages on the login page of their site. This issue arises while using a third-party plugin, Woocommerce Members Only, to create a login page.
Solution:
1. Ensure that all WPML plugins and add-ons are updated to the latest version, currently 4.7.2, to benefit from recent bug fixes and improvements. Update instructions can be found at http://wpml.org/faq/install-wpml/.
2. Verify the setup of the WPML and the member plugin on your site to match the configuration on your website. If discrepancies are found, adjust accordingly.
3. If the problem persists, consider contacting the plugin author to report the issue, especially since the plugin claims to be WPML compatible. They can also seek direct support from us through the Go Global program at https://wpml.org/documentation/support/go-global-program/.

If this solution does not resolve your issue 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.

This topic contains 6 replies, has 1 voice.

Last updated by Dražen 2 weeks, 6 days ago.

Assisted by: Dražen.

Author Posts
March 25, 2025 at 10:41 am #16856688

tomv-24

Background of the issue:
I added a language switch on the login page of my site hidden link. I am trying to set up a language switcher using WPML.

Symptoms:
Whenever I change the language on the login page, it keeps redirecting, resulting in a 'too many redirects' error.

Questions:
How can I fix the 'too many redirects' error when switching languages on the login page?

March 25, 2025 at 12:53 pm #16857675

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

While one of my teammates handles your ticket, I will provide you with initial debugging steps.

Please update your WPML plugin and add-ons to the latest version, 4.7.2, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work on the newest code available to troubleshoot the issue best.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Remember to backup your database before you proceed.

If the issue persists after an update has been done, please let us know how you created and translated the login page.

March 25, 2025 at 1:25 pm #16857907

tomv-24

I already tried updating my plugins, but the issue is still there.
I translated my login page using the WPML translation editor in the backend using edit page.

March 27, 2025 at 11:12 am #16867921

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

1) How are you creating this login page, using some 3rd-party plugin or?

2) I also see this in URL ?wcmo_referrer=%2F, can you explain what it is and how it was added?

Regards,
Drazen

March 27, 2025 at 2:28 pm #16868989

tomv-24

1. I have an own page where I load the woocommerce login form
2. This is also from a 3rd party plugin called: Woocommerce Members Only

March 28, 2025 at 7:21 am #16871202

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

1) So I assume you add it there via WC shortcode, right?

2)
Can you please try next:

- Make sure you have a backup.
- Disable all other plugins and leave active only WPML plugins and Wocommerce
- Switch to WP default theme
- Check if the issue still happens.

Let me know how it goes.

Regards,
Drazen

April 1, 2025 at 11:12 am #16882507

tomv-24

I disabled all plugins and then it works.
However, I get the same issues after activating Woocommerce.

April 1, 2025 at 12:33 pm #16882856

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for checking, can you confirm the issue happens when only WPML plugins and WooCommerce are enabled and you are using WP default theme?

If yes, please share wp-admin and FTP access to your staging site, so I can take a further look and debug the issue.

Thanks,
Drazen

April 2, 2025 at 7:21 am #16885554

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

the issue seems to happen because of the plugin WooCommerce Members Only, which you are using. It is not on our official compatible plugins list, and some issues may happen.

We can try to reproduce this issue to confirm the bug, and then check with our team if any quick fix, but note that there might not be a proper solution without further plugin author involvement and joining our compatibility program.

We also recommend using WPML official plugins like https://wpml.org/plugin/woocommerce-memberships/

Please go to next test site, and try to reproduce the same issue with mentioned plugin and share steps what you did with me.

- hidden link

Regards,
Drazen

April 2, 2025 at 8:24 am #16885871

tomv-24

I installed the plugin, but I can't activate the license because it is limited to 1 site.
Can I send you the ftp details so you can try on our own site?

April 2, 2025 at 9:30 am #16886209

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

I think you do not need a license, you can proceed to setup WPML / WooCommerce and this plugin settings, and share the steps with me on what you did.

Let me know how it goes.

Regards,
Drazen

April 2, 2025 at 11:09 am #16886551

tomv-24

hidden link as you can see, the license is invalid and doesn't work without it. I created a new page 'Login page' and added the wpml language switch shortcode. However, if you're not logged in, the plugin doesn't redirect you to the login page like it should and does on the actual site.

April 2, 2025 at 1:20 pm #16887289

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I checked, but I see you have not setup WPML or the member plugin same as on your website. I tried, but I can not get the website to be protected, not sure if it really up to licence.

Please try few things more, setup same members plugin and page, and try reproduce the issue on test site,, or you can also check with plugin author and report this issue to them or ask for another license for testing purposes.

As said, we can not guarantee we will be able to fix issue, but we will do our best.

Let me know how it goes and if that is possible.

Regards,
Drazen

April 3, 2025 at 11:03 am #16891493

tomv-24

I just changed the settings to the same as on our own website. The plugin does not work properly without the license. If you go to hidden link and try to change the language you can see that eventually it results in an error: TOO_MANY_REDIRECTS

April 3, 2025 at 12:58 pm #16892398

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for getting back.

I have checked and I can see the same issue as on your website, I tried to check for a quick solution or workaround but could not find it.

The best I can do is suggest you use a WPML official compatible plugin and/or share this issue with the plugin author, since they claim they are WPML compatible. We would be glad to help if they need our help; they can contact us via:
- https://wpml.org/documentation/support/go-global-program/

Hope this makes sense, and sorry for not being more of help.

Regards,
Drazen