[Feature Request] ACF options empty in other languages
This thread is resolved. Here is a description of the problem and solution.
Problem: You have a custom 'options' page created with Advanced Custom Fields (ACF) and the options are not rendering in other languages when the language is changed. You've set the mode to 'Expert' and chose 'Don't translate' because the contents of the option page don't need to be translated (e.g., phone number). However, when you switch languages, the content is missing. Solution: Currently, the functionality to disable translation for ACF option pages and ensure they render correctly in all languages regardless of the translation settings is not available. This issue has been escalated internally as a feature request. As of now, there are no plans to implement this due to limited demand, but it remains open in our internal tracker for future consideration.
If this solution does not apply to your case, or if it becomes outdated, we recommend opening a new support ticket. We also 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. For further assistance, please contact us through the 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 have a custom 'options' page created with Advanced Custom Fields, and the options in it are not being rendered in other languages. I've set the mode to 'Expert' and chose 'Don't translate' because the contents of the option page don't need to be translated (stuff like phone number etc.). On the frontend, when I use get_field('name','option') as per ACF documentation, the content renders fine as expected, but when I change the language, the content is missing.
Symptoms:
The content from the ACF options page is not being rendered in other languages when the language is changed.
Questions:
How do I fix the issue of ACF options not rendering in other languages?
How do I disable the translation for the custom field labels?
So, it seems i have to go to the Custom Options Page i made with ACF, change language from the admin top bar and hit save, even though the field is locked because i chose "Copy". The exact same thing is true if i just go with the "Don't translate" option.
I'd expect that i maybe had to do this 1 time. However, i need to do this everytime for the field to be updated, even though hovering the lock icon on the field says "This field value is copied from the default language and will be kept in sync across languages." - it is not synced. I manually need to change language on the option page and hit save for the field to be shown correctly where it's rendered.
About disabling the "Field Group Labels": I found out that using define('ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true); in the wp-config.php worked.
Back to the Field Group Labels. It seems that the define('ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true); did not work after all. I still see them in the WMPL > Translation Management
New threads created by Bigul and linked to this one are listed below:
Welcome to the WPML support forum. I will do my best to assist you in resolving the issue.
This may be a compatibility issue. Could you please confirm whether you are using a child theme or a fully customized theme?
Please go to WPML >> Settings >> Custom Post Type Translation, and check the translation setting for ACF Field Group. It should be set to Not translatable. Refer to the following article for more details:
2) Increase the *MaxInputVars* of PHP settings to *10000*. Please check the following article for more details, or contact your system admin/hosting provider for this purpose.
In WPML -> Settings -> Custom Post Types, acf-field-group is already set to "Not translatable".
1) I did this, didn't change anything. Which of the 2 issues i have did u expect this to fix?
2) I also did this. Didn't change anything either. Like above, which of the 2 issues did u expect this to fix?
Just to clarify my issues again in short:
Issue 1)
When set to "copy", Custom Fields doesn't synchronize on save. I have to go to the custom Options Page created with ACF, switch language and hit save for the fields to be updated.
Issue 2)
I don't want to translate Field Labels. Can i remove it from the Translation Management screen? Specifically the accordion tab named "ACF Field Group" and "ACF Option Page Labels"?
Thank you for the details. This requires further checking, so could you please consider setting up a staging or development site for testing? This will help us troubleshoot the issue without affecting your live site.
Once the staging site is ready, please fill in the private details fields after taking a full site backup. I would like to access the admin area of your staging site to investigate further.
For more information about how we handle private information, please refer to the links below:
1. The custom fields are set up here: hidden link
All fields are set to “Copy” except for “Land” under the “Adresse” tab.
2. On the options page: hidden link
If I change a field like “Kontaktoplysninger > Telefon” (which is set to “Copy”), it should sync across languages. But it doesn’t.
3. Example: On the frontend, this field is used in the top bar. See English version here: hidden link
4. To make it sync, I have to go back to the options page editor: hidden link
Then switch the admin language to English and click Save. After that, the fields update correctly, even though they’re set to “Copy”.
Question:
Shouldn’t “Copy” automatically sync changes made in Danish to English, without needing to re-save in the other language?
Labels:
The issue still persists. The "ACF Field Group Labels" still appear in "WPML > Translation Management".
Thank you for the details and the login information. We will run further tests and get back to you.
However, we have a quick question. It seems that the ACF (Pro or Free) plugin is not currently installed on your site. Just to confirm, have you exported the ACF field groups as PHP code using ACF's export feature and included them in your theme or a custom plugin? Please let us know so we can proceed accordingly.
I’m using Secure Custom Fields (WP’s renamed version of ACF Pro). Same plugin, same issue — even when I used original ACF Pro.
Fields are created via admin UI — nothing exported to theme or plugin. You can see it clearly here: hidden link (note the acf-field-group slug).
I can switch back to ACF, but that’s not the problem — it’s the same plugin under a new name, and i guarantee you that's not where the issue lies. Even WPML thinks i have ACF installed even though its SCF because only the name has changed.
In Danish, the ACF menu name is called Felter. Maybe thats why the confusion about the plugin being installed or not (i guess you couldn't find it in the admin bar) - Please check the attached photo.
Thank you for the details. I had a quick test on your site and was able to reproduce the issues you are experiencing.
This requires further testing and escalation, so please allow me to make a copy of your site using the Duplicator plugin (https://wordpress.org/plugins/duplicator/) for debugging the issue on our local server.
Thank you for the updates and permission. As a part of troubleshooting, I only performed the following steps on your site:
- Updated the ACF option page values in both languages
- Re-saved the ACF Field Group without making any changes
- Deleted the translation jobs for the ACF Field Group Labels. Refer to this screencast for more details: hidden link
If possible, please restore the backup. I will then create a copy of the site, which will also help us in further debugging.
If that's the only thing you changed, i don't think there's a reason to restore the backup.
I've made some changes to the theme code in the meantime that could be lost.
The issue is still there, so i don't think restoring for debugging will change anything.
Please let me know if this is okay for you. If so, you may just download the backup i created with Duplicator.
Thank you for the feedback. I downloaded the Duplicator copy of the site and am testing it locally. We will get back to you as early as possible. Please wait.
Our developers have confirmed that it is currently necessary to re-save the options page in each secondary language for ACF fields set to Copy for their values to be correctly applied across translations.
Maybe this behavior is expected to improve in future versions of ACFML. The values of Copy fields will be copied automatically to secondary languages without the need for manually re-saving the options page. However, this feature is still in the early stages of development, and there is no estimated release date at the moment.