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

Last updated by Laura 7 months, 2 weeks ago.

Assigned support staff: Laura.

Author Posts
February 15, 2019 at 4:44 pm #3206045

valentinP-4

I have a site with Romanian as default and English and German as secondary.
I am trying to: Create a post with a Title (for instance) AAA in English and get a slug /en/AAA. Then if I go in German and create a post with the same title AAA and I get a slug /de/AAA. If I duplicate the post in German to English, then WPML changes automatically the slug of the post in English and make it /en/AAA-2/ and make another post in English as a translation of the one in German with same slug /en/AAA-2/ but truly with different page id. But when I go and display the pages in english, although they have different id's it show me just one and later on gives 404
Please advise

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

February 16, 2019 at 4:46 pm #3207966

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

thanks for contacting us.

I'm not sure I get the issue.
If you have a post in German with slug /de/example/ and you duplicate it to English BUT there is already an English post /en/example/ then it's expected that the second, duplicate post will be /en/example-2/ because there can't be 2 posts in the same language with the same slug, it doesn't matter if they don't have the same ID.

You write "I go and display the pages in english": where, in the front end? In a menu?
There is some example I can see? What would you expect to happen?

February 16, 2019 at 6:32 pm #3208106

valentinP-4

Hi Laura, yes that is the case. the only problem is that it not only make /en/example-2 to the second but also to the first one (/en/example/). it changes both slugs with the same structure /en/example-2. Although the page id's are different, when make click to display it they both goes to the initial one's content. The only way to make it work is to choose the permalink post structure as postID. If I set it postID then it works because it goes by numbers so it make the difference. But I want to have a proper permalink structure for SEO, I mean I would like to use the post name as permalink not postid. Could you please advise. Same in backend and front end. Thx

February 18, 2019 at 12:24 pm #3212146

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

I tested this on a fresh installation and I can see the issue, even if in my case all the page had the same slug.

The point is it shouldn't be possible to have the same slug in 2 elements from the same post type, so we're investigating this. At the moment the only workaround I can suggest is to change the slug in one of the 2 pages.

March 6, 2019 at 3:35 pm #3280079

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

after discussing, we concluded this is expected behavior. WPML search for matching pages and return the one with the lower ID, so that's why you see the translated page instead of the duplicate if you created the translation first.

However, it would be better not to have pages or posts with the same slug (also for SEO reason) so we are not going to fix this.

Let me know if this helps you or if you need further assistance.