Skip to content Skip to sidebar

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 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Bruno Kos 2 years, 3 months ago.

Assisted by: Bruno Kos.

Author Posts
July 31, 2023 at 3:09 pm #14128473

deanm-3

I am trying to:

I create a custom taxonomy. I created an acf group with an image field configured with translation preference as "copy".
WPML is intsalled with 2 languages.
I use Redis Cache Object plugin.
If I edit a term on the main language, it should propagate to translations.
Can you confirm me if a definitive patch is possible ? Can you integrate a fix ?

Link to a page where the issue can be seen:

I expected to see:
I would like that the main language field's value propagates to tanslations field's value.

Instead, I got:
The translation keeps the cached value.

My "temporary" fix is :

function wpmlsupp_10715_clean_cache( $term_id ) {
    //wp_cache_delete( $term_id, 'term_meta' );
    
    global $sitepress;
    $translations = $sitepress
			->term_translations()
			->get_element_translations( $term_id, false, true );

		if ( ! empty( $translations ) ) {
			foreach ( $translations as $term_taxonomy_id_to ) {
				wp_cache_delete( $term_taxonomy_id_to, 'term_meta' );
			}
		}
}

The commented line come from another ticket marked as resolved :
https://wpml.org/forums/topic/acf-term-fields-cache-not-cleared-properly/

August 1, 2023 at 2:00 pm #14134993

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

This would be a workaround:
https://wpml.org/forums/topic/acf-term-fields-cache-not-cleared-properly/page/2/#post-13728863

Apart from that there isn't a permanent solution as the issue is still in developers queue.

I will keep this thread updated, other than that I have no news.

Regards,
Bruno Kos