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.

Our next available supporter will start replying to tickets in about 6.96 hours from now. Thank you for your understanding.

This topic contains 6 replies, has 2 voices.

Last updated by Ahmed Mohammed 1 year, 4 months ago.

Assisted by: Ahmed Mohammed.

Author Posts
May 6, 2023 at 7:46 am #13597671

Angeloca

I am trying to copy a cloned gallery fields which uses the "prefix field name" option

The fields gets copied, meaning that the IDs of the images are copied, but I see the primary language captions instead of the translated one.

The clone field is set to copy and the CLONED one is as well set to copy in ACFML options. The whole field name (prefix + name) is also set as copy in the wpml-config.xml.

Link to a page where the issue can be seen: hidden link - First gallery is not a clone field and it works correctly. Second gallery is a clone + prefix field.

I'm using local json fields

May 8, 2023 at 10:50 am #13604663

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+03:00)

Hi there,

Thank you for contacting WPML support!

I understand there's an issue with the cloned gallery field in ACF.

We have fixed an issue with the cloned fields in ACFML 2.0.0, but maybe we've missed this.

I created a sandbox website and installed ACF PRO and WPML here: hidden link.

Could you please use that quick login URL and replicate the issue so we can pass it on to our developers?

Looking forward to hearing back from you.

May 10, 2023 at 10:29 am #13620743

Angeloca

Hi Ahmed,
thanks, I'll set it up and get back to you here 🙂

May 10, 2023 at 10:40 am #13620889

Angeloca

Hi Ahmed,
check this out:

hidden link
hidden link

Same image ids

May 11, 2023 at 3:30 pm #13631463

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+03:00)

Hi there,

Thank you for replicating the issue.

When I replace

var_dump(get_post_meta($post->ID, 'clone_gallery', true));

with

$galley_images = get_field('clone_gallery');
		foreach($galley_images as $image){
			echo $image['ID'] . '<br>';
		}

I got the translated IDs in the translated post, and I believe the translated captions will be loaded. So, could you please use ACF functions on your website and let me know if the issue is still there?

Looking forward to hearing back from you.

May 12, 2023 at 2:07 pm #13637947

Angeloca

Hi Ahmed,
thanks for the reply, so this works only with the "official" get_field function?

I usually try to avoid get_field due to performance.

I'll try with get_field on our environment and let you know

May 12, 2023 at 4:51 pm #13638885

Ahmed Mohammed
Supporter

Timezone: Africa/Cairo (GMT+03:00)

Hi there,

ACFML plugin is designed to work with ACF default functions. Please give it a try and let us know how it goes 🙂

Looking forward to hearing back from you.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.