Skip Navigation

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

Problem:

Repeater field are not saved correctly. It returns only the count of the rows of the repeater (no array or object just string).

Solution:

Repeater fields should be set to COPY if you want to have the same number in both languages.

Then your subfields like text, file, etc should be set to Translate if you wish to add different values for another language.

Relevant Documentation:

- https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by guyW-3 2 years, 2 months ago.

Assisted by: Dražen Duvnjak.

Author Posts
August 24, 2022 at 12:42 pm #11921929

guyW-3

Hello,
I have a problem with repeater field inside of custom post type in my clients website,
previously I had a problem that data that i inserted to the post got deleted.
I solved it with the support here (the fields group got duplicated twice because of wpml and it overwrite itself). we deleted the unused fields and it solved that problem.

now we inserted 2 post in the repaeter and the data didnt passed to the page. it returns only the count of the rows of the repeater (no array or object just string).

hidden link thats one page that we inserted the data to the repeater,
the field called 'downloads_repeater',
we passed a 'print_r' function after the call of the 'get_field' function.

you can see the problem under downloads (הורדות) tab.

August 26, 2022 at 7:48 am #11934933

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello!

Welcome to WPML Support. I'll do my best to help you solve this issue.

1) Does the issue still happen if you create a new dummy product and try the same?

2) Can you please share a video of your ACF groups / filed settings and the process where I can see you adding content for that field in default language and translating? This way I can easily see if any issue with the setup or configuration or process of translation?

Thanks,
Drazen

August 31, 2022 at 12:11 pm #11964783

guyW-3

Hi Darzen.

Thank you for helping us resolve this issue.

to answer your points:
1) the problem is resolved on creating new product but it still happened on exciting products.

2)how can I share the video with you?

August 31, 2022 at 12:27 pm #11964835

guyW-3

hidden link thats the video

September 1, 2022 at 5:19 am #11968491

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back and sharing the video.

If the issue doesn't happen on the new product if it isn't to many problems I would suggest deleting the current one and creating a new product. Since it could be there is a mix-up in DB for this product field and it causes problems for you.

Let me know how it goes and if possible.

Thanks,
Drazen

September 1, 2022 at 5:38 am #11968539

guyW-3

Hi Darzen,
thank you for answering in short notice.

about the suggested solution, we dont want to delete the product and enter again the information, we have couple of products with the same problem who got translated already. it will cost us a lot of time to renter the data.

September 1, 2022 at 5:56 am #11968581

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I can have a further look, but the issue should be visible with the WP default theme and/or simple code. As per our policy, we can not debug issues with custom code / theme.

https://wpml.org/purchase/support-policy/

I suggest you create a staging website and show us the issue there with a minimal simple environment.

Please make a full backup of your site (files and database) and confirm it in your next reply.
If possible please provide access to the staging website, not production.

Please note, that I might need to do some debugging procedures like enable/disable plugins, switch themes, change the default language of the user account, and/or access your website database to debug the issue furtherly.

I would need to access both your site's wp-admin and FTP account, if possible.

I have enabled the private username and password fields in your next reply.

I suggest you create a new user, set it as an administrator and then add those credentials in the private fields mentioned.

You can safely add your information into these fields.

Kind regards,
Drazen

September 1, 2022 at 8:19 am #11969349

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

I have checked and found the issue.

You have set the main repeater fields to be TRANSLATE, which is not correct. Repeater fields should be set to COPY if you want to have the same number in both languages.

Documentation: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Then your subfields like text, file, etc should be set to Translate if you wish to add different values for another language.

I have set them to COPY: downloads_repeater, files_repeater. Then edited the default language and added some files, then translated 2nd language.

Video:
- hidden link

Product link: hidden link

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

Screenshot_2.jpg
September 1, 2022 at 9:01 am #11969851

guyW-3

The problem seems to be solved, i dont see any more problem