Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

The client is building a bilingual website using WPML, with custom post types created via CPT UI. The specific issue is that accessing posts in English under the /exhibitions slug leads to a 404 error.

Solution:

1) Disable slug translations in WPML>>Settings>>Slug translations, then save the changes.
2) Resave the permalink settings under Settings>>Permalinks.
3) Clear all types of caches.
4) If the issue persists, it might be due to a compatibility conflict with the customized theme. We recommend testing with the default WordPress theme to check if the issue still occurs.
5) Ensure you are using the latest version of WPML String Translation and clear WPML caches from WPML>>Support>>Troubleshooting.
6) Resave the settings under WPML>>Languages>>Language URL format and Settings>>Permalinks again.

If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.

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 0 replies, has 1 voice.

Last updated by Bigul 2 weeks, 2 days ago.

Assisted by: Bigul.

Author Posts
November 22, 2024 at 4:58 pm #16434781

jean-francoisJ-2

Background of the issue:
I am building a new website in French (FR) and English (EN) using WPML, with French as the original language. I created five custom post types (CPTs) using CPT UI. One of these CPTs, named 'Expositions art contemporain', uses the slugs /expositions in FR and /exhibitions in EN. My translations are mostly complete, and the website works as intended in the original language. The issue can be seen at: hidden link.

Symptoms:
When trying to access posts in English under /exhibitions, they all lead to a 404 error.

Questions:
Why do the translated posts under /en/exhibitions lead to a 404 error?
What troubleshooting steps can I take to resolve this issue?

November 22, 2024 at 8:43 pm #16435240

Andrey
Supporter

Languages: English (English ) Russian (Русский )

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

While one of my teammates takes care of your ticket, I will provide you with the first debugging steps.

Have you tried to resave the permalinks in Settings → Permalinks?

If this is still the issue, please check if non-WPML related plugins do not affect this behavior.

Please provide us with a detailed description of your steps to create and translate CPTs. In some cases, screenshots can help clarify any confusion or miscommunication. If you want to share a screenshot, please use the "upload an image" feature below the comment section.

November 22, 2024 at 8:57 pm #16435279

jean-francoisJ-2

Good day Andrey.

Yes, I have resaved the permalinks in Settings → Permalinks, first thing I did.

I used CTP UI to create my new post types, 5 total. Note that the only one at fault is the one described in my ticket.

After I was done with CPT UI, I went into WPML -> settings ->
Slug translations to activate it. Then, Post Types Translation to set up all my post type slugs at once. Saved, then Settings -> Permalinks just to be on the safe side.

November 25, 2024 at 6:40 am #16437901

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. Please try the following steps after a full site backup and check is there any difference in the result.

1) Visit WPML>>Settings>>Slug translations
2) Disable the the slug translation option and save the changes
3) Visit Settings>>Permalinks and resave the settings
4) Clear all types of caches

Please check the attached image. Now the Exhibitions posts archive (the following one) is pointing to Homepage instead of its original page in French. Have you noticed it before.

hidden link

--
Thanks!

Bigul

2024-11-25_10h52_47.png
November 25, 2024 at 2:53 pm #16440639

jean-francoisJ-2

Thank you for the reply Bigul.

Did exactly as you described. No changes. Though, I fixed the issue where the translation for the ENG exhibitions archive pointing to the FR home page.

November 25, 2024 at 4:45 pm #16441327

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. Please fill in the private details fields after a full site backup. I would like to access the admin area of your site for further checking. Refer to the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

November 26, 2024 at 8:39 am #16443311

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. But I am getting the following warning while logging. Please check.

Erreur : l'identifiant **** n'est pas inscrit sur ce site. Si vous doutez de votre identifiant, essayez plutôt votre adresse courriel.

--
Thanks!

Bigul

November 27, 2024 at 11:15 am #16448780

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. I can log in now. This looks like a compatibility issue. So please allow me to make a duplicator copy of your site using the Duplicator plugin (https://wordpress.org/plugins/duplicator/) for debugging the issue locally.

--
Thanks!

Bigul

November 27, 2024 at 1:06 pm #16449881

jean-francoisJ-2

The plugin is installed. Please proceed.

November 27, 2024 at 5:23 pm #16451324

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates and permission. I made a copy of the site. We will debug it further and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

November 29, 2024 at 2:14 pm #16459938

Bigul
Supporter

Languages: English (English )

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

Hello,

I had a few rounds of testing in our local copy. It looks like the bug is happening because of a compatibility conflict with your Customized theme. It works fine with the default WordPress theme when all plugins are active. Please check the following screencast for more details.

hidden link

We have support limitations for the customized theme and plugins. So can you please check about this with your theme author - https://wpml.org/purchase/support-policy/

--
Thanks!

Bigul

November 29, 2024 at 2:51 pm #16460154

jean-francoisJ-2

Thank you Bigul.

I am the theme author.

So, something in my theme breaks this section but you can't tell me what or why.

Can you guide me as to how to identify the problem?

November 29, 2024 at 4:57 pm #16460817

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. It may be complicit in the templates you have created for this Post Type (Expositions art contemporain). Are you using any custom queries for this Post Type?

--
Thanks!

Bigul

November 29, 2024 at 6:42 pm #16460948

jean-francoisJ-2

No. I'm using single-expos-art-contemp.php, default settings to pull and show the content up.

December 2, 2024 at 2:10 pm #16466642

Bigul
Supporter

Languages: English (English )

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

Hello,

Thank you for the updates. Sorry for the late response because of the weekend. I am consulting with our team for an expert opinion on this and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul