Skip Navigation

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

Problem:
You are experiencing 404 errors on translated pages of your website. The error temporarily resolves after saving the permalink settings twice but reoccurs after navigating other pages.
Solution:
We recommend the following steps to permanently resolve the 404 error on translated pages:
1. Navigate to WPML -> Settings -> Post Types Translation.
2. Expand the option 'Set different slugs in different languages for Trainingen'.
3. Translate the slug to your desired languages, for example, DE (ausbildung) and EN (training).
This should resolve the issue of 404 errors on translated pages.

If this solution does not apply to your case, or if it seems outdated, 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 issue persists, please do not hesitate to open a new support ticket at WPML support forum for further assistance.

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

Last updated by Otto 1 week, 2 days ago.

Assisted by: Otto.

Author Posts
March 22, 2025 at 7:27 am #16846903

andreS-54

Background of the issue:
I am trying to visit the link hidden link but encounter issues.

Symptoms:
Translated pages sometimes show a 404 Error. The error resolves temporarily after saving the permalink settings twice, but reoccurs after visiting other pages. I have cleared the Elementor and Theme Cache.

Questions:
Why do translated pages sometimes show a 404 Error?
How can I permanently resolve the 404 Error on translated pages?

March 22, 2025 at 4:07 pm #16847726

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please revise if this is related?
https://wpml.org/faq/why-is-htaccess-getting-overwritten-with-the-language-folder-on-my-wpml-website/

To verify, connect to your server and open the .htaccess file in a text editor.

If the RedirectBase is not set a / and intead using something like for example /en then you should apply the suggested workaround.

I suggest you use a Child Theme for this workaround:
hidden link

Best regards
Andreas

March 24, 2025 at 1:55 pm #16852434

andreS-54

Hi,
thankyou for your reply.

I doesn´t show these things in the htaccess and even if I apply the Code in the functions.php the same things are still happening.

Alles Gute,
André

March 25, 2025 at 1:40 pm #16858022

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello André,

I suspect it may be a compatibility problem. Is it possible for you to do this test?

**IMPORTANT:** Please try this in a staging environment or at least with a backup of your site files and database before continuing.

Disable all plugins except WPML-related and temporarily change the theme to a default WordPress such as Twenty Twenty-five.
Is the issue resolved with these settings? If so, please reactivate one by one to see which conflicts.

Best Regards,
Otto

March 26, 2025 at 7:00 am #16860629

andreS-54

Thank you for your help!
I tried so but it doesn´t resolve.
Do you have any other idea?

March 26, 2025 at 12:17 pm #16862703

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for testing.

Let's try a few more things:

1. Clear All Caches:
• Since you’ve already cleared the Elementor and theme caches, clear any server-side caches and your browser cache to ensure that no cached data is causing the issue.

2. Use WPML’s Troubleshooting Tools:
❌ Please make a full website backup before proceeding ❌
• Navigate to WPML > Support > Troubleshooting. 
• Click on the following options: 
• “Clear the Cache in WPML”
• “Remove ghost entries from the translation tables”
• “Fix element_type collation”
• “Fix WPML table collation”
• “Set language information”
• “Fix post type assignment for translations”

3. Check for Duplicate Slugs:
• Ensure that no two pages (including translations) share the same slug, as this can cause conflicts leading to 404 errors. 

4. Verify .htaccess File Permissions:
• Ensure that your .htaccess file is writable. An unwritable .htaccess can prevent permalink structures from updating correctly, leading to 404 errors. 

If, after performing these steps, the issue persists, I would like to request temporary access (wp-admin) to your site to take a better look at the issue.

It would be better to a testing site where the issue is replicated.

The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I'll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site.

This will allow me to create a copy of your site and your content.
Once the problem is resolved I will delete the local site.

**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields.

Best Regards,
Otto

March 27, 2025 at 12:50 pm #16868516

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hi André,

Thanks.

I have two questions:
- How was the "trainingen" CPT created? Custom code? A plugin? The theme?
- How did you translate the slug from "trainingen" to "ausbildung"? It's not in WPML -> Settings nor WPML -> String Translation

Best Regards,
Otto

March 27, 2025 at 2:55 pm #16869191

andreS-54

Hi Otto,
thank you for your reply.

I had not built this site and the owner doesn´t know a lot about this.
I tried to find out how the CPT were created but it is not in the ability of the theme nor of one of those plugins installed. So it might be custom code.

I can´t remember to translate "ausbildung" manually. So it must have been translated automatically. Maybe in the Menu Snychronisation Tool.
Also as I looked for this, I tried the Menu Synchronisation again and now the main menu in the header disappeared at all. Or have you done something to the menu?

I hope you can find a solution.

Alles Gute,
André

March 27, 2025 at 4:32 pm #16869706

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hi André,

I haven't done anything with the menu or other things; I just took a look.

The slug won't be translated in the menu.

I'll make a copy of your site to take a better look locally. I'll get back to you.

Best Regards,
Otto

March 27, 2025 at 5:23 pm #16869886

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hi André,

In my local copy of your site, I did the following:
- I went to WPML -> Settings -> Post Types Translation
- For "Trainingen" I expanded "Set different slugs in different languages for Trainingen."
- I translated the slug to DE (ausbildung) and to EN (training)
- Then the 404 disappeared

Can you please try it on your site?

Best Regards,
Otto

March 27, 2025 at 5:48 pm #16869982
andreS-54

Wow! Thankyou very much.
Now it works perfectly.

Also the problem with the menu esolves.
In the meantime I updated the theme with the newest version and I had to renew the menu with one click.

There is one more question: I could not find where to translate the string "Meer weten" in the header. Even not with the string-translation.
Do you have an idea where it could be translated.

New threads created by Otto and linked to this one are listed below:

https://wpml.org/forums/topic/i-could-not-find-where-to-translate-the-string-meer-weten/

March 27, 2025 at 5:54 pm #16869991

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Great! I am closing this ticket then.

For your new question, I created a new one:
https://wpml.org/forums/topic/i-could-not-find-where-to-translate-the-string-meer-weten/

See you there 😊