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.

Tagged: 

This topic contains 24 replies, has 3 voices.

Last updated by Shekhar Bhandari 1 year, 8 months ago.

Assisted by: Bruno Kos.

Author Posts
May 24, 2023 at 2:38 pm #13708829

Bruno Kos
Supporter

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

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

Hi,

Did you clear the cache after adding the patch? Because when we tested this in this site it worked, but only after the cache was cleared after the patch was added.

Can you apply the patch, clear the cache and test then? If all these steps don't work, can you record us a video again using hidden link to show us this again? Perhaps there is still something we are missing in the workflow, but for us it works.

Regards,
Bruno Kos

May 24, 2023 at 9:27 pm #13711455

Stephen Merriman

Yes, I cleared the cache in advance.

Trying again, I do see one small difference - now when I add the French category, it connects to the English one straight away. However, after setting a custom field that should be immediately copied to the translation, it doesn't sync until I force the cache to clear.

Have re-recorded the video.

hidden link

May 25, 2023 at 6:55 am #13712443

Bruno Kos
Supporter

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

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

Escalated to 2nd Tier

May 29, 2023 at 5:49 am #13728863

Bruno Kos
Supporter

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

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

Hi,

This issue seems to be related Redis caching so it is not related to WP Engine. Can you add this code in theme functions.php?

function wpmlsupp_10715_clean_cache( $term_id ) {
	wp_cache_delete( $term_id, 'term_meta' );
}
add_action('created_term', 'wpmlsupp_10715_clean_cache', 99);
add_action('edited_term', 'wpmlsupp_10715_clean_cache', 99);

We escalated this to case to our developers as well.

Regards,
Bruno Kos

June 2, 2023 at 3:02 am #13758269

Stephen Merriman

I've added that to the active functions.php file on hidden link demo site, and have cleared all caches, but am still seeing the same issue afterwards.

Incidentally, and I'm not sure whether this will help or just make things more complex and should be moved to a new support topic, my client has been experiencing other issues on their live WP Engine site which are potentially cache-related. For example, after creating a page and attempting to translate it via the Translation Editor, it will show up in the Translations queue as 'Needs translation' - but after entering the translations and saving, the changes won't stick and it will still show 'Needs translation', without the translated page appearing. This repeats numerous times; occasionally the job disappears from the queue entirely - only some combination of translating it around 5 times and clearing caches in between finally gets the translation to stick.

May be best to leave this outside the scope of this support ticket, but just bringing it up in case the caching issues affecting this situation are causing much more widespread issues, which seems like a reasonable chance if you haven't been able to narrow this one down yet.

June 2, 2023 at 10:01 am #13760515

Bruno Kos
Supporter

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

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

Hi,

Can I ask you to record another video with wpmlsupp_10715_clean_cache function added, making sure that we are on the same page in terms of reproducing? Because it worked for us as of now.

As for the other issue, please open a new ticket as this is for our support tools to keep issues separate.

Regards,
Bruno Kos

June 5, 2023 at 9:47 pm #13774719

Stephen Merriman

OK, I recorded exactly the same video as before:

hidden link

June 6, 2023 at 7:42 am #13775617

Bruno Kos
Supporter

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

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

Hi,

Please update the translated term without any change.

The code is clearing term cache when term is created or updated. So when you add the new term translation this will work and when updating the translation then it will work.

Regards,
Bruno Kos

June 9, 2023 at 4:31 am #13796541

Stephen Merriman

OK, that does work - but is this the intended solution or just a temporary workaround? From my client's perspective, it would be better for WPML to clear the term's cache when you update it, rather than having to go to a different page and save what looks like the 'wrong' information before the right information shows up.

June 12, 2023 at 4:22 am #13806201

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

As Bruno is currently on vacation, I will be taking care of this ticket going forward.

The mentioned fixes are a temporary solution and these issues are escalated to our developers for a permanent fix.

Thanks