Support » Plugin: Menu Item Visibility Control » PHP Fatal error – Urgent help required

  • Resolved thefingerprint


    You will see below there is a fatal error when trying to view the menus. Why is this happening and how do we resolve it?

    Thanks in advance

    PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Menu_Items_Visibility_Control::wp_nav_menu_item_custom_fields(), 4 passed in /wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /wp-content/plugins/menu-items-visibility-control/init.php:44
    Stack trace:
    #0 /wp-includes/class-wp-hook.php(287): Menu_Items_Visibility_Control->wp_nav_menu_item_custom_fields(‘2717’, Object(WP_Post), 0, Object(stdClass))
    #1 /wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 /wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /wp-content/themes/betheme/functions/theme-mega-menu.php(283): do_action(‘wp_nav_menu_ite…’, ‘2717’, Object(WP_Post), 0, Object(stdClass))
    #4 /wp-includes/class-wp-walker.php(144): Walker_Nav_Menu_Edit_Mfn->start_el(”, Object(WP_Post), 0, Object(stdClass))
    #5 /wp-content/plugins/menu-items-visibility-control/init.php on line 44

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author shazdeh



    The issue is caused by the theme (betheme/functions/theme-mega-menu.php). If update is available please update your theme, if not please contact them and ask them for one.

    That being said, I just pushed an update to hopefully fix this in themes that haven’t been updated to be compatible with WP 4.5.


    Your update to the theme has resolved this issue. I did speak to the theme creators and they did say everything was up to date for 5.4 so seems odd.

    Anyway your update has fixed it so i’m happy with the outcome.

    Thanks again for your assistance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal error – Urgent help required’ is closed to new replies.