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
10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 10:00 – 14:00 - -
16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 16:00 – 20:00 - -

Supporter timezone: Asia/Jerusalem (GMT+03:00)

This topic contains 12 replies, has 0 voices.

Last updated by Itamar 4 weeks, 1 day ago.

Assisted by: Itamar.

Author Posts
May 4, 2025 at 8:38 am #16992835

benS-40

Background of the issue:
I'm experiencing an issue with a Repeater field containing image subfields when using WPML's Advanced Translation Editor.
The field is registered under WPML → Settings → Custom Fields Translation, with both the repeater field and the image subfield set to 'Copy'.

The field is created using Advanced Custom Fields (ACF).
On the original language page, the repeater displays correctly. On the translated page, the content from the repeater does not appear, even though it's set to 'Copy'.

I receive the following error in the template file: Warning: foreach() argument must be of type array|object, string given in C:MAMPhtdocsyotpowp-contentthemesyotpopage-templatespage-home_v2.php on line 282.
This error points to this line:

Which is inside a loop: $brands = get_field('brands');

" alt="">

On the translated page, get_field('brands') appears to return a string (e.g., '21') instead of the expected array of rows, which breaks the loop and triggers the warning.

What I've Tried: Ensured that both the repeater and image subfield are set to 'Copy' in WPML settings.
Used WPML’s Advanced Translation Editor — however, the repeater content does not show up in the editor for translation or review. Tried re-saving the original post, but this didn't fix the issue. Verified that the data exists on the original page and that ACF is rendering it correctly in the default language.

Symptoms:
On the translated page, the content from the repeater does not appear, and I receive a warning: 'foreach() argument must be of type array|object, string given'.

Questions:
Why does the repeater field content not appear on the translated page even though it's set to 'Copy'?
Why does get_field('brands') return a string instead of an array on the translated page?

May 4, 2025 at 9:04 am #16992898

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

as the chat is diconnected I created this ticket to follow up with you and see if the steps mentioned worked for you or not.

If not, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

Thanks.

May 4, 2025 at 12:15 pm #16993183

benS-40

I tried it but still doesn't work

May 4, 2025 at 2:38 pm #16993340

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

May 5, 2025 at 2:30 pm #16996839

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the login information, I tried to access the ACF Field Groups but I see no way in the menu. Is there something preventing me to access ACF fields so I can check the settings?

Can you give me the link to the page that lists all the field groups?

Thanks.

May 6, 2025 at 8:05 am #16999766

benS-40

Access to ACF fields group is available only on my local machine, to prevent deploying issues,
this how it define in my local, but same issue is happen:

Capture22.PNG
Captur1.PNG
May 6, 2025 at 3:18 pm #17002573

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

It will be hard for us to be able to troubleshoot the issue without having access to the ACF Fields themselves.

May I ask for a version of the website that has the permission so we can check?

You can set the next reply as private.

Thank you.

May 7, 2025 at 9:06 am #17005208

benS-40

This is only on my local machine, maybe we can set a zoom call?

If I Understand right we should be able to use WPML without using ACFML.

May 7, 2025 at 1:46 pm #17006876

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the reply. We do not have Zoom call support, but I will do my best to help here.

The ACFML plugin is necessary to make WPML compatible with ACF, so that i mandatory when using ACF.

I wonder if you could provide a copy of the website to us that has permission to check the ACF fields for further investigation?

You can give us a version that does not have any sensitive information.

Here is how to provide one and which plugin to use:

https://wpml.org/de/faq/provide-supporters-copy-site/

I assume you would have the same login information so I will be able to login when I download the copy.

Thanks.

May 8, 2025 at 9:18 am #17010496

benS-40

I get an error while trying to backup the website from this plugin, Can I send you a link for backup that I created?

May 8, 2025 at 2:09 pm #17012504

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

May I know which plugin you used to create a better backup so we can use that?

You can send the link by setting the next reply as private

May 13, 2025 at 5:18 am #17025060

benS-40

Shared, It's a backup I created without plugin.

May 13, 2025 at 12:40 pm #17027598

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the backup. I tried many time to download but unfortunately due to a huge amount of the data (17 GB) it fails anytime.

Is it possible that you avoid zipping the media (upload) folder so it will be smaller to be able to download?

Thanks.

May 13, 2025 at 4:29 pm #17029083

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi Shalom.

I'm Itamar, and we have communicated via email about this case. I'll continue to help you with this issue. I'm downloading the package from your site and will continue checking things on my local server. I'll update you here once I have news about this issue.

I appreciate your patience.
Itamar.

May 14, 2025 at 2:01 pm #17032815

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'm struggling with your site's package on my local server. It is not working correctly. I'm consulting our second-tier supporter about the error you shared with us, hoping they will have an idea about it. I'll update you here once I have their reply.

I appreciate your patience.
Itamar.

The topic ‘[Closed] Repeater field is not appear on the translated page’ is closed to new replies.