This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing an issue where switching to the Spanish language on their website redirects them to the homepage instead of the translated Activity page. They have set up WPML and translated a custom post type (CPT) 'Cooking Classes' but encounter redirection and 'Invalid post type' errors.
Solution:
We recommend the following steps to troubleshoot and resolve the issue:
Ensure that the custom post type 'Tours' is properly configured for translation in WPML. Go to ACF > POST TYPES > TOURS > EDIT, select WPML translation Editor, and click the + sign to translate it.
If these steps do not resolve the issue or if you encounter further problems, it might be due to outdated information or a different configuration. 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 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.
This topic contains 15 replies, has 3 voices.
Last updated by Andreas W. 5 months, 2 weeks ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
June 13, 2024 at 6:18 pm #15737576 | |
odisseasK |
Background of the issue: Symptoms: Questions: |
June 13, 2024 at 6:37 pm #15737608 | |
Lucas Vidal de Andrade Supporter
Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly. Please make sure that in WPML > Settings your custom post types are marked as translatable. Besides that,I checked your debug info and noticed that your website doesn't have the minimum memory required for WPML to work. WPML requires a memory limit of at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set WP Memory Limit in your wp-config.php file by adding the following code: define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '512M' ); See: https://wordpress.org/support/article/editing-wp-config-php/#increasing-memory-allocated-to-php for details. Increasing WP Memory may help improve the performance and sometimes also help resolving such issues. If that does not help, one of my colleagues will soon come to continue support. |
June 13, 2024 at 7:20 pm #15737663 | |
odisseasK |
Thanks Lucas for your support. I had already set the limits to 128 but now I changed it to 256. Please let me know if you still see the error |
June 13, 2024 at 9:04 pm #15737816 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, If you revise the Spanish menu, it actually seems as if those contents were not yet published. Please revise the status of your translated content. It may happen that translations are saved as draft, if at the moment that you began translating the content the original content was still saved as draft. Also, in case you use "Translate Everything Automatically" by default the translations are saved as a draft. You will need to complete a review at WPML > Translations first before they get published. This can be altered for new translations using the options on WPML > Settings > Automatic Translation. Best regards |
June 14, 2024 at 9:35 am #15739412 | |
odisseasK |
Hello Andreas. I translate everything myself. I translated a custom post type instance. |
June 14, 2024 at 6:42 pm #15741135 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. Best regards |
June 15, 2024 at 9:43 am #15741576 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
If I switch to the translated CPT on the list view or the WordPress Editor, I get the message "Invalid post type". Is it possible to temporarily disable plugins on this install and maybe even switch the theme for testing purposes? |
June 15, 2024 at 12:50 pm #15741727 | |
odisseasK |
I have only translated two post types in the website. The first one is this ( STAY > Blue Sky Cave house Oia ) hidden link The other one is this (ENJOY > Cooking Classes ) hidden link If you visit those two instances in English version and HOVER over the Spanish Flag, you see at the bottom left that the link is the correct one. But when you CLICK on the Spanish flag on And when you CLICK on the Spanish flag on is tells you that there are no results for this page. YES you can disable plugins or switch themes. This is a testing website. Thank you for your support |
June 15, 2024 at 6:29 pm #15741994 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
On ACF > Post Type click "Edit" and then translate the post type. I did this already for "Activities" now: Unrelated to the issue: |
June 16, 2024 at 8:02 pm #15743034 | |
odisseasK |
Can you please explain exactly what you did ? The spanish translation doesn't appear as it should. |
June 16, 2024 at 8:03 pm #15743035 | |
odisseasK |
Also pay attention to the footer in Spanish. It is broken |
June 17, 2024 at 9:56 am #15744448 | |
odisseasK |
I deleted some Divi Theme Builder layouts and I received a critical error coming from WPML SEO Multilingual. Maybe it is related to the issue we are discussing? New threads created by Andreas W. and linked to this one are listed below: https://wpml.org/forums/topic/split-issue-translating-divi-theme-builder-layouts/ |
June 18, 2024 at 4:30 pm #15750265 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I went to On ACF > Post Type clicked the "Edit" option on the post and then used the UI to create the translation for the post type. This solves the main issue of this ticket about CPTs not showing up in the second language. Let me know if you still have questions about this as this is not yet covered by our documentation. We only released the following post about it: Regarding your last two comments, take note that this is a different issue and we only handle one issue per ticket. I am splitting this new issue about Divi Templates into a new ticket and will follow up there with you shortly. You will receive an e-mail notification once I reply to the new ticket. Best regards |
June 18, 2024 at 4:58 pm #15750387 | |
odisseasK |
So if I want to repeat what you did for the Activities ( ex. the TOURS ) , I go to ACF > POST TYPES > go to TOURS > EDIT > select WPML translation Editor and click the + sign to translate it? |
June 18, 2024 at 4:59 pm #15750402 | |
odisseasK |
Thanks for your feedback on Divi Layouts. I will wait for your new ticket. |