Skip Navigation

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

Problem:
The client was experiencing an 'Invalid Post Type' error when trying to translate posts in a custom post type called Reviews. Upon switching the language to English, the error appeared, despite the post type configuration seeming correct.
Solution:
We resolved the issue by modifying the translation settings for the custom post type. In the WPML -> Settings -> Post Types Translation section, we changed the 'Post Type' (acf-post-type) from Translatable to Not translatable. This adjustment allowed the client to switch and edit a Review post in English without encountering the 'Invalid Post Type' error.

If this solution does not resolve your issue, or if it seems outdated, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should the problem persist, please open a new support ticket.

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 9 replies, has 0 voices.

Last updated by elvisP 4 days, 12 hours ago.

Assisted by: Itamar.

Author Posts
May 19, 2025 at 12:36 pm

elvisP

Background of the issue:
I am trying to translate posts in a post type called Reviews. When I switch the language to English, it shows 'Invalid Post Type'. The configuration of the post type seems correct and is similar to another post type called Press. I need help analyzing the problem. Link to a page where the issue can be seen: hidden link

Symptoms:
When I change the language to duplicate and add the content I have translated, I got 'Invalid Post Type'.

Questions:
Why does switching the language to English show 'Invalid Post Type'?
How can I resolve the 'Invalid Post Type' error when translating posts in the Reviews post type?

May 19, 2025 at 1:17 pm
May 19, 2025 at 1:19 pm #17048584

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Please, try the troubleshooting section.

1. Take a backup of the DB of your site.

2. Go to WPML -> Support -> Troubleshooting (link)

3. Once on the troubleshooting screen, press the following buttons and check if it helps. Press each button at a time and wait for the process to complete.

- 'Disable cache for language switcher templates'

- 'Clear language information and repopulate languages' button (if it is showing)

- 'Synchronize posts taxonomies' for 'Reviews'

- 'Clear the cache in WPML'

- 'Remove ghost entries from the translation tables'

- 'Fix element_type collation'

- 'Fix WPML tables collation'

- 'Synchronize local job ids with ATE jobs'

- 'Synchronize translators and translation managers with ATE'

- 'Assign translation status to duplicated content'

- 'Set language information'

- 'Reset languages' Press this button only if you didn't add a custom language!

- 'Fix terms count'

- 'Fix post type assignment for translations'

- 'Cleanup and optimize string tables'

- 'Clear invalid strings'

*** Please make a backup of your database before using this.***

Not all the troubleshooting options may be necessary, but please try them all once you are on the troubleshooting page.

Thanks,
Itamar.

May 19, 2025 at 1:21 pm #17048593

elvisP

Should I try this or you will try it?

May 19, 2025 at 1:40 pm #17048719

elvisP

I tried the troubleshooting but the problem persists. What should I do next?

May 19, 2025 at 3:19 pm #17049368

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for trying my suggestions.

It is recommended to try the following on a staging site and not on the live site.

We suspect a collision with the theme or another plugin might cause this problem. If possible, get your site into a minimum environment, switching to a default WordPress theme like TwentyTwenty-Four and having no plugins activated except WPML and ACF.

First, you must check if the problem persists when just the theme is switched to TwentyTwenty-Four (for example). If it persists, deactivate all plugins except WPML and its add-ons and ACF without any extensions, if you have any. Then, please check if the problem persists. If it does not continue, start by activating the plugins individually and checking when the issue comes back, then report to me which plugin was the culprit.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


*** If your site is live, you might want to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***

Regards,
Itamar.

May 22, 2025 at 10:34 am #17060950

elvisP

Hello,
I tried all of the things above. I cloned the site under a new demo domain inside one of our servers and changed theme, and then disabled plugins but it didn't work. I need further assistance with this cuz it needs to be fixed ASAP.

Thank you in advance!

May 22, 2025 at 1:32 pm #17062107

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for trying my suggestions.

Can you please let us access your staging site so we can check things there? If our second-tier supporters need to debug this issue further and esclate it to our second-tier supporter, please allow me to take a copy of your site. For this, I must install a plugin like Duplicator or All In One Migration. Please let me know if you agree.

If you need further help with this, please share the access details to your site with me. I'm enabling a private message for the following reply.
Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Thanks,
Itamar.

May 22, 2025 at 2:11 pm
May 26, 2025 at 6:32 am #17070965

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for the access details.

I could solve this issue on the staging site. Here is what I did.

In WPML -> Settings -> Post Types Translation, I switched 'Post Type' (acf-post-type) from Translatable to Not translatable. Please see the attached screenshot. Now it is possible to switch to edit a Review post in English.

Can you please confirm that this has solved the problem?

Thanks,
Itamar.

2025-05-26_09-27-11.jpg
May 26, 2025 at 1:34 pm #17073598

elvisP

Hello,
I tried this in the original page and configured the same setting but the problem it's still ongoing, it still says invalid post type.

Please let's follow further this issue.

May 26, 2025 at 1:38 pm #17073604

elvisP

I cleared cache in different levels and after the configuration is working properly now. Thank you very much!