Hello, we're trying to add WPML to a site that has existing custom fields set up using acf_add_local_field_group. I've modified the field inputs to include wpml_cf_preferences values, but they aren't being brought through. I've also ensured that the ACFML setting for scanning local files is enabled and the local constant ACFML_SCAN_LOCAL_FIELDS is set.
I have confirmed that the filter for acf/prepare_fields_for_import is being added, but the ACF fields do not show up in the translation editor.
I've copied some of the code we're using to add fields here: https://pastebin.com/UzFAdmJH
This is included within the theme.
Can you advise on why the ACF fields are not showing up in the translation editor?
Then go to WPML > Settings > Custom fields and check if these settings are like that. It might be some of your code is overwriting this.
Other than that what I suggest is checking without any additional plugins only WPML plugins and ACF, also trying with WP default theme and etc.
If both the translation settings are correct and you made a small change to the default language page and re-translate, then it should show up correctly in the WPML editor.
I did set all the fields as per the recommendations. Only the base-level fields came through to the custom fields settings. None of the flexible content fields came through.
I believe the code lacks the ability to traverse sub-fields to check for translation preferences.
I advise checking same with WP default theme and only WPML plugins and ACF, and check if the issue still happens. You can use same code for ACF fields or create new for some dummy fields.
Let me know how it goes and if it works like that.
Using the same acf_add_local_field_group code as the pastebin sample above in a clean copy of twentytwentythree resulted in the same result. None of the custom fields came through to the translation editor.
I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below:
- hidden link
Kindly follow the steps below:
- Set up WPML
- Install the necessary plugins.
- Try to replicate the issue.
- Share with me step by step guide on how can I check the issue
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
Let me know.
Thanks,
Drazen
The topic ‘[Closed] Local ACF field preferences not applied’ is closed to new replies.