Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Madrid (GMT+01:00)

Tagged: 

This topic contains 7 replies, has 0 voices.

Last updated by Marcel 18 hours, 57 minutes ago.

Assisted by: Marcel.

Author Posts
January 20, 2025 at 12:42 pm #16613388

dianaJ-2

Background of the issue:
I am trying to navigate my website's frontend and click on a product. Since 2-3 weeks ago, I started experiencing a bug that might be connected to a recent Woocommerce issue warning. The issue occurs when clicking on a product, leading to endless redirects and an error. The URL for the page that gives an error is incorrect, with part of the path in English and the rest in Danish. This issue does not happen on all products and occurs occasionally. Initially, I thought it was only affecting me when logged in, but a customer also reported the same issue. I am considering disabling WPML due to this serious issue. Link to a page where the issue can be seen: hidden link

Symptoms:
Endless redirects occur when clicking on a product, resulting in an error. The URL is incorrect, with part of the path in English and the rest in Danish. The issue affects different products occasionally and is not limited to a specific product.

Questions:
Can you help resolve the issue of endless redirects and incorrect URLs?
Is the issue related to the recent Woocommerce warning?

January 20, 2025 at 5:03 pm #16614901

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

I’m unable to reproduce the issue where the URL is duplicated.

When I split the URL, I see two redirects: one leading to the correct product and another as follows:

>>> <em><u>hidden link</u></em>  
> --------------------------------------------  
> 301 Moved Permanently  
> --------------------------------------------  
Status:  301 Moved Permanently  
Code:  301  
Connection:  close  
x-litespeed-tag:  539_HTTP.301  
x-redirect-by:  WPML  
Location:  <em><u>hidden link</u></em>  
However, I do notice a 301 redirect for:
<em><u>hidden link</u></em>.

Could you clarify where this URL is visible on the frontend? When navigating via the category, the issue doesn’t occur. For instance, on this category page:
hidden link.

Please also to update the WP permalinks on Settings -> Permalinks after a full backup.

Looking forward to your input.

Best regards,
Marcel

January 21, 2025 at 9:50 am #16617416

dianaJ-2

Well this is the point - the URL does not exist. Yet, when I clicked on the product on the website, I got the too many redirects error and that URL was visible in the browser address field.
I basically told uou that you might not be able to reproduce the issue as simply as that. I basically also told you that it products - not product categories! that are affected. But it is affecting the website nonetheless. Please solve this.

January 21, 2025 at 10:57 am #16617909

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

when I clicked on the product on the website

Yes, it’s clear the URL doesn’t exist. However, this doesn’t answer my question about how to reproduce the redirect. Please share the exact URL or a screen recording of the process so I can understand your steps. I’ve already tried visiting /shop and clicking on the products, but I couldn’t trigger the redirect. Therefore, I opened your example via the category. I need to know exactly where you’re accessing it from.

Best Regards,
Marcel

January 21, 2025 at 2:50 pm #16619456

dianaJ-2

Maybe it will help you if you logged into the website and took a look? I am not sure how to make a video out of what happens on the screen? And if I took an image, you would have precisely the infomation that I already gave you.

January 21, 2025 at 2:52 pm #16619460

dianaJ-2

I am also not sure what a video will do for you? Is it because you doubt this is happening or you think there is something that I maybe misundertand? Neither is the case so please take a look at the issue assuming that it is not me making a weird mistake.

January 21, 2025 at 2:58 pm #16619470

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

A login to the website won’t be helpful unless I know exactly where you’re clicking the button that triggers the redirect.

What I need is:

1) The exact URL where this occurs. (I tested from /shop and from the category where you example product is included)
2) A screenshot with a clear indication (e.g., highlight or mark) of where you’re clicking on the product that causes the redirect

Alternatively, you can record a short screen video using free tools like hidden link">Loom, if that’s easier for you.

I’m not sure what a video will do for you?

A video would show me the exact location of the link and your actions. Since I’m unable to reproduce the issue on my end, it’s essential to ensure we’re clicking the same product or link.

Best regards,
Marcel

January 21, 2025 at 3:34 pm #16619651

dianaJ-2

But I am trying to tell you exactly this:
There is NO precise location. It is random products at random times that get affected. I get the same type of error, but not the same error every time. Meaning that it is not one widget or or a specific page and a specific product, where you can reproduce the error. A product that is affected at one point, works typically fine later on and then other products get affected. I hope you understand what I mean.
This is why you can log in and then start clicking around on the frontend and check what is happening. I don't know how many clicks or whether it should be on the front page, in a category or on a product page. But it will happen.

January 21, 2025 at 3:58 pm #16619713

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Thank you for the information. Unfortunately, without a clear pattern, it will be quite challenging to debug the issue.

1) Do you think the issue might be related to being logged in?

2) Please try testing the same action while logged out, using Incognito mode. This will help us check if the problem is linked to your account or session, or to features that only work when you're logged in.

3) Have you also resaved the permalinks as I suggested earlier? If you have, did the issue still occur afterward?

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 a testing site where the issue is replicated.

You will find the needed fields for this 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 make a backup of 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

Best Regards,
Marcel

January 24, 2025 at 1:39 pm #16631581

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Thank you for providing access. I’ve thoroughly tested over 25 different products across various loads and browsers, both while logged in and logged out, and I couldn’t replicate any redirect issues.

Also, the added example above doesn't create a double 301 redirect anymore. I tested this also logged-out with other products:

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 301 Moved Permanently
> --------------------------------------------

Status:	301 Moved Permanently
Code:	301
Connection:	close
x-litespeed-tag:	539_HTTP.301
x-redirect-by:	WPML
Location:	<em><u>hidden link</u></em>

>>> <em><u>hidden link</u></em>

> --------------------------------------------
> 200 OK
> --------------------------------------------

Status:	200 OK
Code:	200
Connection:	close
content-type:	text/html; charset=UTF-8
link:	<<em><u>hidden link</u></em>;; rel=shortlink
etag:	"733930-1737715140;;;"
x-litespeed-cache:	hit
date:	Fri, 24 Jan 2025 13:34:39 GMT

In general, no redirect is set in different products:

$ curl -Ils <em><u>hidden link</u></em>
HTTP/2 200
content-type: text/html; charset=UTF-8
link: <<em><u>hidden link</u></em>;; rel="<em><u>hidden link</u></em>"
link: <<em><u>hidden link</u></em>;; rel="alternate"; title="JSON"; type="application/json"
link: <<em><u>hidden link</u></em>;; rel=shortlink
etag: "732034-1737674532;;;"
x-litespeed-cache: hit
date: Fri, 24 Jan 2025 13:37:58 GMT
server: LiteSpeed
vary: User-Agent
alt-svc: h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"

Even if there were an incorrect URL somewhere (as mentioned in your first message), your visitors wouldn’t notice it. The second redirect is handled properly, and the page loads correctly with a 200 status.

WPML regularly creates extra categories and product properties, where new ones in different languages are added to the original language (Danish).

For this issue, please create a separate ticket with a clear example so we can investigate it further. Let’s keep the focus here solely on the redirect issue.

Best regards,
Marcel

January 24, 2025 at 2:25 pm #16631738

dianaJ-2

Thoroughly tested? 25 products is nothing as this happens on random products at random times and no, not that often luckily. So you have been lucky/unlucky.

I have at no point suggested that there was an incorrect URL anywhere on the website, please note that. In fact, I tried to explain a lot of times that the issue is fluctulant and appears and disappears. Just today, I had the same issue, on mobile, while clicking on a product link from a purchase confirmation mail. IT IS NOT a mail link issue, and IT IS NOT an issue with an incorrect URL somewhere on the website. It is an issue that mixes up languages, thus the mixed language URL. The issue appears when clicking on a CORRECT link.

Since you haven't been able to reproduce the issue and thus have no idea what is wrong, how can you tell that no customers experience this issue? Are you aware that we have a loyalty program, requiring cusomters to log in?

Please find attached a screenshot of the error. Please note that this was the result when clicking on the product on the homepage. And no, the link to the product is not inccorect. This is a dynamic issue.

Now, please, either figure out and solve the issue, or let me know that I need to cancel my subscription and remove WPML.

Regarding the other issue, I think it is waste of time creating separate tickets for every issue. You have access to the site. What more do you need?

redirects error.jpg
January 24, 2025 at 2:43 pm #16631812

dianaJ-2

In fact, I might have been wrong. The issue seems to be even deeper. Just now I hovered above the blanket product on the homepage and noticed the URL in the bottom. Please check it out. Again, the URL of the product is not incorrect - this is a dynamic issue that messes up with random URLs!

And also, I have had the same type of issue on two different computers and on mobile that aren't even in the same part of town. So it is not a device-bound issue.

Error new screenshot.jpg
January 24, 2025 at 2:45 pm #16631834

dianaJ-2

Just to note, since you might not be expert in Nordic languages, the two categories after /shop/ are in Sweedish, the rest is, as it should be, in Danish

January 24, 2025 at 4:39 pm #16632183

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Thank you the information. Yes, based on your description, it seems this issue is intermittent and tied to dynamic behavior, which can make it quite challenging to reproduce. Reproducing the issue on our end is critical because it allows us to pinpoint the root cause and deliver an effective solution.

I completely understand how frustrating this might be, and I want to assure you that I’m here to help. Together, we’ll figure this out, and I’ll do everything I can to resolve it as quickly as possible. Please don’t hesitate to reach out with any further details or questions.

---
I was able to observe the behavior when opening the same URL from your screenshot.
hidden link redirects to: hidden link.

I also noticed the same behavior with the blanket product. After deactivating and reactivating WPML and clearing your static cache, the products now load correctly: hidden link. But still include a redirect. As mentioned earlier, your visitors likely won’t "notice" this.

When I opened the Swedish URL from your screenshot:
hidden link, it still redirects correctly to the hidden link">appropriate URL.

What I can see now:
1) The URL with /shop/omsorg-och-vaelbefinnande is no longer present on the homepage in the preview.
2) The correct Danish URL is displayed hidden link.
3) This redirected me to hidden link:

--------------------------------------------
301 Moved Permanently
--------------------------------------------
Status: 301 Moved Permanently
Connection: close
Content-Type: text/html; charset=UTF-8
X-Redirect-By: WordPress
Location: <em><u>hidden link</u></em>
X-LiteSpeed-Cache: hit
Content-Length: 0
Date: Fri, 24 Jan 2025 16:01:34 GMT
Server: LiteSpeed
Vary: User-Agent
Alt-Svc: h3=":443"; ma=2592000

Which is weird, and raises a question: Why is WordPress applying a 301 redirect to the same URL? (This is your default lang where WPML is not involved). It’s possible the issue could appear differently depending on the product, but as seen in most cases, the redirect correctly outputs the real product with the appropriate Danish categories.

Let's check "Tyngdevest" as product next:
4) We have here still the Swedish category URL:
hidden link
5) It redirects to the correct Danish URL:
hidden link.

When checking the hidden link. If I open the hidden link">backend, I can confirm the URL is correctly stored as: pleje-og-velvaere/tyngde/.

Key findings so far:
- The default language links the category incorrectly.
- This is reproducible across different products but isn’t always visible because of a 301 redirect.
- The correct URL is stored in the database.
- Searching for a product returns always the correct Danish categories (pleje-og-velvaere/tyngde).

This issue seems to affect only the frontend when WooCommerce is loaded via a WPBakery element. This indicates to me this is a caching-related issue. I deactivated "LiteSpeed Cache" and the affected product displayed the correct URL in the preview:
hidden link. Via command line tools, no redirect happens anymore, it returns status "200 OK"

Could you confirm this so far? It’s possible the issue still occurs on different products, but I can confirm that your LiteSpeed Cache is involved.

Best regards,
Marcel

January 25, 2025 at 9:59 am #16633317

dianaJ-2

Hi Marcel

I can unfortunately confirm that the issue is still present. I updated a plugin today so I cleared all cache and checked the website on incognito. ALL products on the front page were shown with mixed language URLs and gave an error and this not logged in and in incognito.

I tried resaving the permalinks and cleared the cache again - that did not help.

I paniked a bit so I disables all WPML plugins and cleared the cache. That did not solve the issue - I ended up with the same mixed language URLs, just on one-language website. So I reactivated WPML again and cleared the cache again. This time the links were correct for the products on the front page.

But it is really scary that suddenly all products on the frontpage - and who knows if it wasn't the whole website - appeared wrong and gave a redirect error!

I must just also point out that this is not something connected directly to WPBakery elements. I have experienced it when clicking on related products under a product (WPBakery is disabled on product pages) and when clicking on correct links sent by mail (newsletter or order confirmation, where WPBakery has absolutely no role).

I also must point out that the issues started somewhat at the same time you warned about some issues with WooCommerce. Could it be there is a connection?

Inkognito, after cache clear, same error.jpg