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 5.91 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 2 voices.

Last updated by Prosenjit Barman 1 month, 2 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
September 27, 2024 at 7:29 am #16228585

adrienR-5

Background of the issue:
I'm using Object Cache Pro on my website and I have some issues with WPML. My main language is French, and I see multiple times the same menus. In the other languages, I see no menus. When I disable Object Cache Pro, it's back to normal. I contacted support yesterday and they told me to add this mu-plugin: https://wpml.org/forums/topic/new-translations-fail-to-appear-on-a-page/page/6/#post-15270176. It solved the issue at the beginning but today the issue is still there, so maybe we're missing some entries to exclude?

Symptoms:
Multiple instances of the same menus in the main language (French) and no menus in other languages when Object Cache Pro is enabled.

Questions:
Are we missing some entries to exclude to resolve the issue with WPML and Object Cache Pro?

September 27, 2024 at 7:52 am #16228685

adrienR-5

When I scan the groups in Object Cache Pro, I have the groups "nav_menu_relationships", can this be excluded? Maybe that's what causing the issue

markuphero-GnCSvGzvFSRjLDpz8fdd.png
September 27, 2024 at 10:33 am #16229452

adrienR-5

Well adding 'nav_menu_relationships' didn't helped, after some time the menus are vanished again

<?php

/**
 * Plugin Name: WPML Non-Persistent Cache
 * Description: A plugin to prevent persistent caching issues (temporary issue: compdev-220).
 * Author: OnTheGoSystems
 * Author URI: https://wpml.org/errata/problems-with-buddypress-multilingual-and-redis-object-cache/
 * Version: 1.0.0
 * Plugin Slug: compdev-220
 */

/*if (function_exists('wp_cache_add_non_persistent_groups')) {
    error_log('Adding non-persistent groups for WPML');
    wp_cache_add_non_persistent_groups([...]);
} else {
    error_log('wp_cache_add_non_persistent_groups function not available');
}*/
wp_cache_add_non_persistent_groups([
    'convert_url',
    'element_translations',
    'get_pages_adjust_ids',
    'get_user_admin_language',
    'translation_priority_relationships',
    'translationmanagement--get_translation_job_id',
    'wpml_cache_terms_per_lang',
    'wpml_endpoints_support',
    'wpml_pre_option_page',
    'wpml_register_string_filter',
    'wpml_register_string_filter--facetwp',
    'wpml_slug_translation_records--post',
    'wpml_slug_translation_records--taxonomy',
    'wpml_st_cache',
    'wpml_term_translation',
    'wpml_tm_blog_translators--has_translators',
    'wpml_wp_cache__group_keys',
    'nav_menu_relationships',
]);
September 28, 2024 at 4:52 am #16231556

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're facing. Could you clarify if the French menu has been translated into the other language and whether the translated menus are appearing in the French version, or are you only seeing the French menu multiple times in the French version?

If you're only seeing the French menu multiple times on the frontend, the issue could be related to the theme or customizations made in the child theme. In that case, it would be best to consult the theme author or support, as WPML doesn't seem to be causing the issue here.

However, if you notice the translated menus appearing in the French version, or if the translated menus are not showing in other languages due to object caching, it's possible that the navigation menus are part of a different cache group managed by the theme. In one of your screenshots, I noticed a cache group named 'Bricks'. Could you try adding that group to the non-persistent cache group and see if it helps resolve the issue?

If the issue persists, it would be better if you could replicate the issue in our sandbox environment. You can use the autologin link below to access it.

- hidden link

WPML and the necessary add-ons are already installed in the sandbox. Please go ahead and install the Bricks theme and the Object Cache plugin, then configure them the same way you did on your main site. After that, check if you can replicate the issue.

If you're able to replicate the issue, please let me know, and I'll take a closer look to advise on the next steps. This will also allow us to escalate the issue to our 2nd tier team if required.

I hope you can understand. Please let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

The topic ‘[Closed] WPML Menus conflicting with Object Cache Pro’ is closed to new replies.