Skip Navigation

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

Problem:
The client was experiencing 404 errors when switching between translated slugs for a custom post type in different languages using WPML. The issue arose after setting different slugs by language in the theme settings, which conflicted with WPML.
Solution:
We recommended removing the language-specific slug entries in the theme settings that were conflicting with WPML. This adjustment should resolve the 404 errors when switching languages. If you're experiencing similar issues, we suggest checking your theme settings for any language-specific configurations that might interfere with WPML's slug translations.

If this solution does not apply to your case, or if it seems outdated, please visit our known issues page and verify that you have the latest versions of themes and plugins installed. If the problem persists, we highly recommend opening a new support ticket for personalized assistance. You can do so here: 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 3 replies, has 1 voice.

Last updated by Harald 2 months, 1 week ago.

Assisted by: Andreas W..

Author Posts
March 6, 2025 at 1:06 pm #16783354

Harald

Background of the issue:
I am trying to translate the slug for a custom post type 'service' into German as 'leistungen' and into Italian as 'servizi' using WPML -> Settings -> Translate post types.

Symptoms:
After translating the slug, the links do not work properly, and switching between German and Italian results in a 404 error.

Questions:
How can I fix the 404 error when switching between translated slugs in WPML?

March 6, 2025 at 2:58 pm #16784162

Andreas W.
WPML Supporter since 12/2018

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

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

Hi,

It seems that the minimum requirements are not met on the server:
https://wpml.org/en/home/minimum-requirements/

Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128M.

Your current values ​​are:

PHP Memory Limit 256M

WP Memory Limit 40M

You need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.

Add this code to the wp-config.php file to increase WordPress memory:

define ('WP_MEMORY_LIMIT', '256M');

Add this just before this comment:

// That's all, stop editing! Happy blogging.

The current values ​​can be viewed under WPML > Support > WordPress.

These settings can be restricted directly by your hosting provider. Therefore, I recommend contacting them and asking them to change them directly if the changes are not applied immediately.

If adjusting the limit will not solve this issue, please let us know.

Best regards
Andreas

March 6, 2025 at 3:24 pm #16784326

Harald

Hi,

ok, I changed to 256M, but issue is still there.

Below the settings I made, but I've seen, in the settings of the theme I can give custom names to the custom post type too, for german and italian.

Well, currently by testing the site first looks all good, but then links seems to be broken (error 404), the link change to something like hidden link, altought I put the italian an german translation.

Screenshot 2025-03-06 162036.png
March 7, 2025 at 3:13 am #16785944

Andreas W.
WPML Supporter since 12/2018

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

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

I would like to request temporary access (wp-admin and FTP) to the site to investigate the issue further.

The required fields are below the comment section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.

IMPORTANT
Please be sure to back up the site and database before granting us access.

If you can't see the "wp-admin / FTP" fields, your post and site login details will be set to "PUBLIC". DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private reply form looks like this:
hidden link

The next time you reply, click on "I still need assistance".

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We are not allowed to access any credentials that were not specifically submitted on this ticket in the private response form.

March 7, 2025 at 9:14 am #16786925

Harald

I guess I have resolved the problem. In the theme settings you can give the cpt different slugs by language.

I think, this made problems with wmpl, after removing the entries, it seems to work.

ty