This topic has 2 replies, 2 voices, and was last updated 4 years ago ago by Olga Barlow
There is a problem in et_get_main_menu function inside theme-functions.php
The function wp_cache_add is getting $cache_slug value with “et_get_main-menu”, while wp_cache_add function just accepts an Int value in that position as cache expire time.
if(!function_exists('et_get_main_menu')) {
function et_get_main_menu( $menu_id = 'main-menu', $class = '' ) {
$custom_menu_slug = 'custom_nav';
$cache_slug = 'et_get_' . $menu_id;
if($menu_id == 'main-menu-right') $custom_menu_slug = 'custom_nav_right';
$custom_menu = etheme_get_custom_field( $custom_menu_slug );
$one_page_menu = '';
if(etheme_get_custom_field('one_page')) $one_page_menu = ' one-page-menu';
if(!empty($custom_menu) && $custom_menu != '') {
$output = false;
$output = wp_cache_get( $class, $custom_menu, $cache_slug );
if ( !$output ) {
ob_start();
wp_nav_menu(array(
'menu' => $custom_menu,
'before' => '',
'container_class' => 'menu-main-container' . $one_page_menu . $class,
'after' => '',
'link_before' => '',
'link_after' => '',
'depth' => 10,
'fallback_cb' => false,
'walker' => new Et_Navigation
));
$output = ob_get_contents();
ob_end_clean();
wp_cache_add( $class, $custom_menu, $output, $cache_slug );
}
Hello,
We’ll fix this issue in the next theme update. If you want to fix it now then https://prnt.sc/vgl317
replace wp_cache_get( $class, $custom_menu, $cache_slug );
by
wp_cache_get( $class, $cache_slug );
and
wp_cache_add( $class, $custom_menu, $output, $cache_slug );
by
wp_cache_add( $class, $output, $cache_slug );
Regards
You must be logged in to reply to this topic.Log in/Sign up