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

Last updated by Radu 3 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
July 10, 2019 at 11:37 am #4179535

martinW-38

I want to have the standard WPML behavior where I will be redirected in certain scenarios. For example, I have a page:
hidden link

and its translation:
hidden link

What I expect is that when I manually change the language slug in URL to /en/ (so hidden link) I will get automatically redirected to the english post (hidden link). As far as I can tell, this is standard behavior on WPML sites and that's what happens for me on some of my other WPML sites. For example, on:

hidden link

I can change the slug to /fr/ or /en/ and will then arrive at the french or english version of the post. However, on hidden link I'm getting a "page not found" error. The posts are correctly set as translations of each other in the backend. What could be the problem?

July 10, 2019 at 12:35 pm #4180293

Radu
Supporter

Languages: English (English )

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

Hey Martin,

Thank you for reaching out the WPML support!

I just tested this on my side and it seems that the redirect that you described works fine for both pages and posts.
The difference that I spotted in the post that you said that's not working as I expected is the /blog/ part in the URL. Can you tell me how did you add it to the link, please? Maybe that's the part that's making the redirect go wrong. I'm asking about the way that the /blog/ part was added so I can try to add it on my website too and see how things work this way.

Thanks,
Radu

July 10, 2019 at 3:04 pm #4181903

martinW-38

Hey Radu, I'm adding that part of the url in settings->permalink settings, as in the attached screenshot. Thanks for your help so far!

July 11, 2019 at 11:50 am #4189421

Radu
Supporter

Languages: English (English )

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

Hey Martin,

I tried to add this part to the permalinks on my website too and everything seems to be working very well. In this case, I'm thinking that maybe a plugin (or even the theme) that you're using is doing some changes and makes the redirect not work. In this case, can you deactivate all the plugins except for WPML, activate a default theme (like Twenty Nineteen), and tell me if this issue is still there, please?

Thanks,
Radu

The topic ‘[Closed] Redirection not happening when changing the language slug in URL’ is closed to new replies.