Home›Support›English Support›[Resolved] Enableing WPML translation of custom post type crashes Translation management
[Resolved] Enableing WPML translation of custom post type crashes Translation management
This thread is resolved. Here is a description of the problem and solution.
Problem: You are setting up WPML for the first time and have enabled translation for custom post types created with the ACPT plugin. However, when these are enabled, the Translation Management page crashes Solution: First, ensure that the custom post types are compatible with WPML. Although not officially tested by our team, the ACPT plugin, has developed an integration with WPML. You can find more details here: https://docs.acpt.io/integrations/wpml
But you need to make sure that the 'hierarchical' parameter for your custom post types is explicitly set to either true or false during registration. If this parameter is omitted, it may default to null, causing the error.
If these steps do not resolve your issues or the solution seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If problems persist, we recommend opening a new support ticket at our 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 set up WPML on my site for the first time. I enabled translation for custom post types 'News' and 'governance'.
Symptoms:
When I enable custom post types to be translated, the Translation Management page crashes. The site itself does not crash, but I get an incorrect word count for the entire site. Most of the content is in Bricks editor, which is supposed to be fully compatible.
Questions:
Is there something that needs to be enabled or setup on my side?
The custom post types are created with the ACPT plugin, right? They developed an integration with WPML: hidden link
It's not on our compatibility list, though. This doesn't necessarily imply that it is not compatible, just that our team has not tested it yet.
Please follow the instructions mentioned on this page: https://wpml.org/documentation/support/debugging-wpml/
Then, try to reproduce the issue and check your installation's **wp-content** folder to see if a file named **"debug.log"** was created (it will only be generated if a server error occurs).
If the file was created, please upload it to a platform like **Google Drive** or **Dropbox** (whichever you usually use) and share the link with me (make sure it is publicly accessible) so I can analyze it.
About the word count when you open the editor do you see any content that shouldn't be there? Like JSON, CSS or HTML tags?
Try the following:
- Make a small edit in the original page and update
- Go again to WPML -> Translation Management and check if the word count was updated properly
Hi Otto.
Unfortunately there is no log recorded. I can reproduce the bug at any time. If I enable translation for my custom post type I cannot get to Translation Management menu as I get critical error warning. If I disable them, it works.
As for the word count, I only get 2 or 3 words counted, probably only the title, no Bricks entered content is counted...
Let me know how to proceed.
Best regards,
Aurel
The error message indicates that the ‘hierarchical’ argument receives a Null value instead of a Boolean. This can occur if the custom post types are registered without explicitly setting the ‘hierarchical’ parameter.
Verify Custom Post Type Registration:
• Ensure that both ‘News’ and ‘governance’ post types are registered with the ‘hierarchical’ parameter explicitly set to either true or false. If this parameter is omitted, it may default to null, leading to the error you’ve encountered.
Regarding the word count, does the issue only happen with these post-type content, or does it also happen in regular posts/pages?
Thank you Otto, it seems there is a bug in ACPT and I will report it to the author, after your suggestion, enabling and disabling hiearachial option, everything works, so as you said, default is off but not explicitly set. I will report this so thank you!
Word count happens only on Bricks pages where all of the content is entered inside Bricks builder so the Gutenberg side is empty, custom post types like News is counted correctly (probably because everything is entered inside Gutenberg)..
New threads created by Otto and linked to this one are listed below: