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+01:00)

This topic contains 8 replies, has 2 voices.

Last updated by Dražen Duvnjak 4 months, 2 weeks ago.

Assisted by: Dražen Duvnjak.

Author Posts
June 28, 2024 at 8:15 am #15850237

nathanR-5

Background of the issue:
I have an ACF options page which contains some fields including a repeater field.

The field group is set to "expert" mode, and it contains one group of fields which is set to "translate".

In this group is a repeater which is set to "copy", and one sub field (an image field) which is also set to "copy".

This repeater does not sync.

The primary language (english) repeater has 10 images in it, whereas the french version is empty.

I have tried editing the english version and forcing a resave, but the french version remains empty.
I have also tried changing the translation settings of the repeater and the image field, but no combination populates my repeater.

Symptoms:
The french repeater field did originally have 3 images in (not the full 10 which the english version had).
Even though the field is locked in the french version, a user can still delete repeater rows, which is what has happened here.

Questions:
How can I force a resync so the english images are copied to the french version?

June 28, 2024 at 9:06 am #15850652

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

as requested here is the ticket, please let us know how it goes and if you find out this still happens with WP default theme.

Regards,
Drazen

June 28, 2024 at 10:23 am #15851023

nathanR-5

This still happens with the default theme.

I have learnt that setting the field group to "copy" will mean that the repeater gets updated in french when changed in english, BUT this also means that all of the text fields in the group will only show english and cannot be edited in french.

Changing the field group to "copy once" does the same.

The only setting which works is to set the group to "translate" and the repeater field to "copy". Doing this will kepe them in sync, but ONLY if you save the french version with a change.

June 28, 2024 at 10:38 am #15851163

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

Layout fields ( group and repeater) should be set to COPY as per our docs: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

Then it should work fine, but the problem is there is a known issue with that and the workaround way would be to use Copy Once, which copies it the first time and then later you need to adjust it manually.

- https://wpml.org/errata/advanced-custom-fields-sub-fields-are-overwritten-in-options-page/

So issue is, that copying your image works fine, but it can not translate text because of the errata above, on the other hand using copy once you can translate it but the images are not synced or some other fields, depending on the first save and you need to adjust it manually.

I am afraid I do not see any other way until the errata is fixed, you can use the workaround you mentioned if that works fine for you, or use copy once and adjust it manually.

Let me know.

Regards,
Drazen

June 28, 2024 at 11:27 am #15851448

nathanR-5

Copy once doesnt seem to work when the group has already been edited - as in it doesnt look like setting "copy once" weeks into a build makes much difference.

Currently my translate fix works on my staging site but not on the live site, which I have feelings might be related to acf-json. I suspect this because it didnt work locally at all when you were helping me earlier until I deleted my acf-json for that fieldset and resaved it.

I am now looking for a fix which will work on live as well.

June 28, 2024 at 11:41 am #15851510

nathanR-5

Another thing I have noticed: On the live site, the english repeater has 10 images. If I set the main group to "copy" both have 10 images. If I then update the group to "copy once" or "translate" the french version goes back to 3 images.

Is there no way to properly force a resync and remove whatever the french version has saved?

June 28, 2024 at 12:40 pm #15851958

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks.

1) I understand using copy once might not be the best case, but that is for now our workaround until we have a proper fix. Best I can do is to recheck with our team if there is any other suggestion, but before that I would need to you to reproduce simple example on new test site. Let me know if you wish to proceed like that and I will provide one.

2) Yes, I am afraid not as I explained before, COPY would be the correct one but there is bug with it currency, copy-once copied state on first time-saving, and sub fields keep going back to those.

The best I can do is advise using a workaround until a proper fix or you reproduce a simple example and I ask for 2nd opinion from our devs.

Regards,
Drazen

June 28, 2024 at 1:08 pm #15852158

nathanR-5

Hi Drazen,

I can certainly try to reproduce it on a new site 🙂

June 28, 2024 at 1:11 pm #15852169

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

great, here it is: hidden link

Please do not use any custom theme, code, or additional plugins other than ACF and WPML plugins.

Let me know when you have reproduced it and the steps you took.

Thanks,
Drazen

The topic ‘[Closed] ACF repeater field not syncing’ is closed to new replies.