Home›Support›English Support›[Resolved] Field values disappear after setting a CPT to publish flexible content.
[Resolved] Field values disappear after setting a CPT to publish flexible content.
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues where field values disappear after setting a custom post type (CPT) to publish flexible content, it might be due to the translation settings of your ACF field groups.
Solution: We recommend checking the translation settings of your ACF field groups in WPML. Specifically, ensure that the 'acf-field-group' is set to 'Not Translatable' in WPML -> Settings -> Post Types Translation. Here's a step-by-step approach to resolve the issue: 1. Delete all language translations of the field group(s). 2. Set 'acf-field-group' to not translatable. 3. Add the field group in the default language (English, in this case). 4. Test these changes on a staging/test site after taking a full backup. Additionally, if you want to maintain the current settings, follow this workflow for adding posts: - Add the post first in German. - Then add the translation to another language (e.g., Slovak). - If adding another translation (e.g., Polish), first edit the post in German, then add the translation. Repeat these steps for other translations. For further guidance, please check the recommended custom fields translation preferences for ACF and WPML.
If this solution does not apply to your case, or if it seems outdated, 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 issues 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.
Reference to our recent chat I've moved the matter to this ticket as requested.
I need to investigate the issue in more detail and escalate accordingly. So I request temporary access (WP-Admin and FTP), preferably to a test site where the problem has been replicated.
Your next answer will be private, to share this information safely.
Also provide detailed steps to reproduce the issue and links to pages in the admin and on the frontend.
IMPORTANT: Please take a complete backup of the site to avoid data loss. I may need to activate/deactivate plugins also.
I tried to login to your site and after submitting the credentials, there's the following error:
> There has been a critical error on this website. Please check your site admin email inbox for instructions.
Can you please check on your side if you can login? If yes, please deactivate all plugins and switch to 2024 theme and let me know. I'll then try again and activate plugins as needed.
I checked the issue in very much detail. However I found following a little confusing:
A. Site's default language is English, while other languages are secondary.
B. But the ACF field group was added in German first (making it field group's default lang) and then translated to other languages (considering those secondary langs for the field group).
Based on the above mentioned, I tried following scenarios and recorded my screen (download from hidden link - contains 2 recordings as below):
1. screencast-Slovak to German.webm: Shows adding post first in Slovak which has fields in secondary language as compared to German. When adding German translation, fields are not copied and some are even locked and post can not be saved (due to required locked fields).
2. screencast-German to Slovak.mp4: Shows adding post first in German (because the field group was first added in German and then translated to other langs). So when adding Slovak translation, all fields are copied (except the ones set as translate). And content is retained even after it is published.
Why this is happening? Please consider following.
This is happening because you've set "acf-field-group" to "Translatable" in WPML -> Settings -> Post Types Translation, which is not the correct way and is not recommended.
If you keep it that way the above mentioned 'll keep happening and you may also keep getting undesired results.
If you want to fix this for good, then correct workaround is:
- delete all language translations of the field group(s).
- then set "acf-field-group" to not translatable.
- add the field group in the default language (i.e. currently English is the site's default language).
- of course, test this in a staging/test site first, after taking full backup.
Otherwise, if you want to keep this as-it-is, then the correct workflow for adding posts, having these fields, is:
- add the post first in German.
- then add the translation to other language (i.e. Slovak).
- then if you want to add another translation (i.e. Polish), first open the post in German for editing.
- then add translation to other language (i.e. Polish).
- repeat the previous 2 steps for adding other translations of the post.
I've confirmed the above mentioned with my team also.
P.S.: I had to turn off "required" for Address field because Google Maps key was invalid and wasn't allowing me to save a post. You may turn it back on as necessary.
thank you for you reply.
the site default, starting language is english right, but iam german and add all other in german first.
objects are created in different languages, some objects are created by slovak people and then german people create the german translation for the slovak object.
some objects are only in slovak, or polish and not german maybe.
i need translateable field groups because of e.g. city informations /description need to be in the language the user used,right?