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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

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

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Bruno Kos 1 day, 5 hours ago.

Assisted by: Bruno Kos.

Author Posts
January 1, 2025 at 7:36 pm #16557425

olegA-5

Background of the issue:
I am trying to access pages on my site that have the same name but are in different directories. When I enter an address with non-escaped characters, WPML performs an inappropriate redirect. This issue occurs in at least two languages. The error does not occur if the characters are escaped, and in other languages (under the same conditions). Here is the information I see about such a redirect: Redirect Source wp_safe_redirect WPML_WP_API->wp_safe_redirect WPML_Query_Parser->parse_query SitePress->parse_query do_action_ref_array(‘parse_query’) WP_Query->parse_query WP_Query->get_posts WP_Query->query WP->query_posts WP->main wp. hidden link is redirected to hidden link while hidden link is not. hidden link is redirected to hidden link while hidden link is not.

Symptoms:
WPML performs an inappropriate redirect when accessing pages with non-escaped characters in the URL. The issue is language-specific and does not occur when characters are escaped.

Questions:
Why does WPML redirect pages with non-escaped characters in certain languages?
How can I prevent inappropriate redirects for these pages?

January 2, 2025 at 7:15 am #16557718

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Thank you for contacting WPML support!

If I check that url as hidden link within hidden link I get:

CONGRATULATION. Everything seems to be fine.

<em><u>hidden link</u></em>
200 OK

But If I test hidden link I get

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

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

Status:	301 Moved Permanently
Code:	301
x-dns-prefetch-control:	on
expires:	Thu, 02 Jan 2025 08:13:05 GMT
x-litespeed-tag:	fc6_HTTP.301,fc6_HTTP.301
x-redirect-by:	WPML
Location:	<em><u>hidden link</u></em>
x-litespeed-cache-control:	no-cache
cache-control:	no-cache, no-store, must-revalidate, max-age=0
content-type:	text/html; charset=UTF-8
content-length:	0
date:	Thu, 02 Jan 2025 07:13:05 GMT
server:	LiteSpeed
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"
connection:	close

So this would be an issue?

Would you be willing to provide me with WordPress credentials so I could investigate the issue directly?

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

I marked your next reply as private so that you can safely add credentials.

Regards,
Bruno Kos

January 2, 2025 at 2:36 pm #16559134

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

I am not sure I fully understand the difference here.

E.g If I open hidden link and click its permalink, it takes me to:

hidden link

and no redirect. Can you confirm?

But if I click this url hidden link from your initial message, it redirects to hidden link

It happens with hidden link as well.

Can you tell me what is the difference between these 2 approaches/URL as they give us different results?

January 2, 2025 at 4:24 pm #16559523

olegA-5

The difference is in the case of letter characters in escaped characters. For example, it could be %c9%99 or %C9%99 for ə. Look at the c character.

January 3, 2025 at 6:23 am #16560355

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

I see - can you tell me what happens if you temporarily disable WPML and try opening hidden link, what happens then?

The URL should remain the same, only without the /az part.

Also, are these URLs available directly on the site or only if you type them so or paste into the browser directly?

January 3, 2025 at 1:37 pm #16561541

olegA-5

With WPML disabled, there is no erroneous redirection.
There should be no such links. But Google found them. That's how I found out about the bug. Google, referring to the results of a fresh scan, shows that the page hidden link is linked to the page hidden link. I don't see that, I see a link from it to a page with a little c in the address. On the other hand, it doesn't matter. Because Chrome sees the address in this format hidden link as containing a capital C (and in this format the address can be written in any 'human readable' document), which should cause a redirect to the address with a small c (but it causes a redirect to a completely different page). It's the same in Icelandic, but Google shows that not only hidden link but also hidden link, i.e. the Estonian version of the Icelandic page in question (hidden link), supposedly links to a variant of the page with a capital C in the address. I cannot confirm this either. And I haven't changed anything in that part, and Google, I repeat, refers to a scan from a week ago.

January 3, 2025 at 2:01 pm #16561590

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

I am checking this with our 2nd tier and will keep you posted. I am not sure what is behind this.