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 2 voices.

Last updated by Bigul 10 months, 2 weeks ago.

Assigned support staff: Bigul.

Author Posts
October 23, 2018 at 9:32 pm #2844131

Patrick Cruz

We have a custom post type called "Events" that's a hierarchy enable post type.

We found that having the same URL example /test-event , /en-gb/test-event

causes the /en-gb/test-event to be 404.

we are usually fixing these by linking the translation to the original. I'm wondering is this the expected behavior for this?

is there anything I can add to the Custom Post Type to fix the urls without the need to connect them to the original?

October 24, 2018 at 7:09 am #2845113

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues. Please let me know the following for tracking the issue.

a) Is this Event post type is provided by your theme? Or are you using custom code to create it?

b) You are getting *404* error for the event posts if the event posts are having the same slug in different languages. For example, when the Event Post URL will be like this hidden link and hidden link, am I right?

c) Please upgrade to the latest version of WPML(4.0.8) after a backup. Then visit Settings>>Permalinks, resave the permalink settings and make sure the issue existing or not

--
Thanks!

Bigul

November 5, 2018 at 5:33 pm #2877766

Patrick Cruz

Hi Bigul,

Thanks for your reply. Apologize for the late response.

Here's what I did so far:
1. Upgraded to 4.0.8
2. resave permalink

The issue still persist.

to answer your questions:

a) custom code to create it.
b) correct! that's exactly what's happening.
c) tried this and still no luck.

anything else I can try?

thanks!

November 7, 2018 at 11:36 am #2884943

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. Please share me the code you are using for creating the Custom Post Type *Events*. So I can try with it my test installations.

Maybe you are facing this issue because of compatibility conflicts. So to make sure if possible, please do the following steps.

a) Backup your site first
b) Switch for a moment to a WordPress default theme like 2017
c) Deactivate all the plugins that are not related to WPML
d) If the issue is gone, activate the plugin one by one to see with which one there is an interaction issue

--
Thanks!

Bigul

The topic ‘[Closed] Same URL 404 on different language on Custom Post Type’ is closed to new replies.