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.
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?
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.
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.
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.
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
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.