Skip to content Skip to sidebar

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

Problem:
If you're experiencing repeated '/en/' in your URL while using WPML, it might not be an issue with WPML itself. This problem could be due to server-side errors that occur when headers are sent before the output, especially when the URL includes a language code like '/en' or '/fr'.

Solution:
We recommend checking your server for any errors that might be outputting before headers. This issue occurs in both the frontend and backend, regardless of whether debugging is on or off.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.

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 3 replies, has 0 voices.

Last updated by Waqas Bin Hasan 1 week, 5 days ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 13, 2025 at 10:06 am

DotLineCode

Background of the issue:
I am working on a site under development and trying to resolve issues with WPML. The database is new, and nothing is in memory. I am following the documentation for different languages in catalogs, specifically for URLs like / - PL and /en/ - EN.

REST API IS ENABLED...

Symptoms:
wrong url /en/en/en/en/en/en/en/en/en.

Questions:
How can I fix the issue with the repeated '/en/' in the URL?

August 13, 2025 at 10:13 am
August 13, 2025 at 10:14 am
August 13, 2025 at 11:54 am
August 13, 2025 at 12:30 pm #17317480

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, I moved to this ticket for further investigation.

I'm trying to login to your site but looks like the credentials are not working anymore.

I've enabled your next reply as private again to provide updated access.

Regards.

August 13, 2025 at 2:57 pm
August 14, 2025 at 1:21 pm #17321130

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access. I'm off today but I'll check soon in the morning and 'll get back to you accordingly.

August 15, 2025 at 6:34 am #17322616

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I checked again in much detail and discussed with the team. Apparently the problem isn't coming from WPML. Since switching to another language feature comes from WPML that's what's confusing here.

While, in fact, there's something wrong on your server side which is throwing output before any headers are sent (i.e. those PHP notices and warnings). And this is happening only when the URL is different than the default (i.e. when there's a language code in the URL like /en or /fr).

Please watch my hidden link">screen recording. And notice that it doesn't matter what is the default language, that unwanted output is thrown when switching the language. This happens in frontend and backend, even when debugging is off.

I've also created a fresh sandbox site (hidden link - one-click login), where you can try configuring WPML as you did in your site and try to reproduce the issue. This is a different environment and may help understanding the above mentioned.