Skip to content Skip to sidebar

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 1 reply, has 2 voices.

Last updated by Mohamed Sayed 1 year, 5 months ago.

Assisted by: Mohamed Sayed.

Author Posts
February 6, 2024 at 6:49 pm #15273562

jessicaP-19

Tell us what you are trying to do? My site is an english site, which I am translating into Chinese. I have a page with a title 'Resource Hub' and a slug 'resource-hub'. This page has been translated into Chinese. My relative URL for Chinese translations is 'zh-hans' and so the translated URL for this page is '/zh-hans/resource-hub'. So, to summarise:

English version = mydomain/resource-hub
Chinese version = mydomain/zh-hans/resource-hub

I have a language switcher enabled on my site, so when I go to 'mydomain/resource-hub' and I change the language switcher from English to Chinese I would expect for it to redirect to 'mydomain/zh-hans/resource-hub', however it does not, it redirects to 'mydomain/zh-hans/?page_id=55063'

Also, on top of that, even though I have completed the chinese tranlsation content through the Advanced Translation Editor, when the URL 'mydomain/zh-hans/?page_id=55063' loads, instead of displaying the expected Chinese content, it loads "Nothing Found - It seems we can’t find what you’re looking for. Perhaps searching can help.", suggesting that it is a 404 possibly.

Also, if I type in the URL mydomain/zh-hans/resource-hub into my browser, the page loads, but again, the content just displays "Nothing Found - It seems we can’t find what you’re looking for. Perhaps searching can help."

So, as you can imagine, I am confused on multiple counts here:

- why does the language switcher load a dynamic URL instead of the correct slug?
- why does the content not load on either the dynamic URL or the correct slug, despite the fact that the translations is complete and the translation shows as 'complete' in the back end.

If you need any more information from me please do not hesitate to ask.

Thanks in advance for your help,

Keith

Is there any documentation that you are following? I have searched the documentation but cannot find anything to help with these issues

Is there a similar example that we can see? No

What is the link to your site? This is a development site and I do not wish to share the link publicly, however I am happy to share the link and access details privately if somebody can contact me (or make this ticket private)?

Thanks very much.

February 6, 2024 at 10:02 pm #15273968

Mohamed Sayed

Hi Jessica,
Thanks for contacting WPML support.

If the translation URL shows the page ID instead of the slug then it might be created as a draft.

Please try the following steps:

1. Edit the page in the default language.
2. Switch the language to Chinese from the top admin bar
3. Publish the Chinese page

Let me know please if that helps.

Kind regards,
Mohamed

February 9, 2024 at 1:46 pm #15286320

jessicaP-19

thank you for your help. Changing the publish status did indeed sort out the URL issue. It didn't sort the 404 but I am investigating as to whether that is a separate issue