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.

Tagged: 

This topic contains 11 replies, has 3 voices.

Last updated by Prosenjit Barman 1 year, 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
April 28, 2023 at 11:07 am #13556859

newsF

When we change the wpml language structure to diffrent language in directroies we are getting redirection issues.

hidden link

April 28, 2023 at 11:16 am #13556905

newsF

When we change the wpml language structure to diffrent language in directroies and lets say default is en, the home url becomes url/en/ which then cause redirection issue with query parameters .

we even preserved the url arguments but they only work when changing the language not when site loads for the first time. You can check the image attached.

here is an affiliate link hidden link
but it redirect to hidden link and we are unable to track.

thanks!

Screenshot (2).png
April 28, 2023 at 12:49 pm #13557601

Laura
Supporter

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

It seems you're using the option "directory for the default language", if you disable it do you still have the issue?

April 28, 2023 at 1:08 pm #13557843

newsF

Yeah if we change the struture it will work but we cant change it, we need this way only.

May 2, 2023 at 6:16 am #13566965

newsF

any update?

May 2, 2023 at 7:58 am #13567577

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for reaching out to us and I'm very sorry for the delay in getting back to you.

I have checked the affiliate link you've shared and found that the link is getting loaded correctly not. The redirection to "/en" is no longer happening on your site.

I also have noticed that the language URL format for your site is currently set to "Language name added as a parameter". Did that solves the issue?

Let me know how can i trace this issue or if you need further assistance in this matter. I will be happy to help.

Best Regards,
Prosenjit

May 2, 2023 at 9:57 am #13569619

newsF

Can you please check now. I changed the struture back to Different languages in directories .

May 2, 2023 at 9:58 am #13569647

newsF

hidden link

try with this url.

May 3, 2023 at 6:17 am #13574995

newsF

any luck?

May 3, 2023 at 11:27 am #13578005

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,

Thanks for your patience. I checked the link and was able to understand the issue. While monitoring the network from the browser dev tool, I noticed that this redirection is controlled by WordPress.

Can you please provide us with your debug information? You can find them in "WPML > Support > Debug information". Copy and paste the text you see in the box I'll enable in the next answer.

You can check this documentation also for a better understanding: https://wpml.org/faq/provide-debug-information-faster-support/

Looking forward to your response. I appreciate your patience and kind cooperation in this matter.

Best regards,
Prosenjit

May 3, 2023 at 1:19 pm #13579055

newsF

Yes, we did some customizations but if we remove that code it still not preserving query strings in the url.
For now i've changed it to ?lang= format but please try to resolve it in that way url/lang/.

May 5, 2023 at 6:25 am #13590833

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

Thanks for sharing more updates. Can you please check what happens if you keep other plugins disabled except for the WPML(and Addons) and the Affiliate plugin that you're using?

If that solves the issue, start activating the plugins one by one and continue to check the issue. In this way, you'll be able to trace if there is any other plugin that is responsible for this issue.

But, if the issue persists even after that, then a closer inspection will require to understand the root cause. 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 have 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

Looking forward to your response and I appreciate your patience and kind cooperation in this matter.

Best Regards,
Prosenjit