Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 5 replies, has 2 voices.

Last updated by Dražen 1 year, 4 months ago.

Assisted by: Dražen.

Author Posts
January 23, 2024 at 1:37 pm #15217282

Eligos Alexander

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?

January 24, 2024 at 8:46 am #15220204

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

can you please confirm you have set the correct translation settings for the fields:

Ignore: 0
Copy: 1
Translate: 2
Copy once: 3

As per the next docs: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

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.

Regards,
Drazen

January 24, 2024 at 10:21 am #15220896

Eligos Alexander

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.

Screenshot 2024-01-24 102034.png
January 24, 2024 at 10:28 am #15220926

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

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.

Regadrs,
Drazen

January 29, 2024 at 5:41 pm #15240180

Eligos Alexander

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.

January 30, 2024 at 7:48 am #15241708

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back, lets check further.

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.