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.

This thread is resolved. Here is a description of the problem and solution.

Problem: ACF doesnt sync fields between languages while the translation preference is set

Relevant Documentation: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#setting-the-translation-preference-for-repeater-fields

This topic contains 1 reply, has 2 voices.

Last updated by Shekhar Bhandari 3 months, 3 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
June 25, 2019 at 4:00 pm

erikS-26

Hi WPML,

Currently I'm working with a custom post type (projects) which consists of a text block and a repeater field. The repeater field should be synced between all the languages (since they only contain images). So, I set the translation preference (WPML > Options) of the repeater field to 'copy'.

I expected to see the exact same output of get_field(); on all languages. The English (main language) works properly. When I visit the page in a different language I see the correctly translated text. But, the get_field(); is not returning anything while I expected it to return the same as the English page.

I would like some help with this since I think this is a bug.

Looking forward hearing,

June 26, 2019 at 5:29 am #4089123

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thanks for writing in! I’m happy to help out.

I read your conversation in the chat and downloaded the duplicator for testing purpose.

After downloading the duplicator, I added a new image on the mentioned page and I can see that "projectImages_3_image" or "projectImages_2_image" is set to copy, so the functionality seems to be working fine.

Further, I checked again why the image is not showing on the translated page and I noticed that you haven't configured the repeater fields properly.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/#setting-the-translation-preference-for-repeater-fields mentions that you should mark your acf_repeater_field and it's system field (which normally starts with _) from hidden fields to make the repeater fields work properly. I can see you have only set project images to copy so the issue was happening. Setting _projectImages works properly.

Being so, I don't think this is a bug than a missed configuration.

Let me know if this helps.

Thanks