• Hi! I encountered fatal error – plugin conflict between Avada theme and Ultimate member – when you go to the menu section it says: critical issue has occured.

    Here’s info from Query Monitor about the exact error:
    Fatal error: Uncaught Error: Too few arguments to function um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /home/admin/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected
    in /home/admin/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php on line 58

    Стек вызовов:

    um\a\c\Admin_Navmenu::wp_nav_menu_item_custom_fields()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php:215
    Avada_Nav_Walker_Megamenu::start_el()
    wp-includes/class-wp-walker.php:144
    Walker::display_element()
    wp-includes/class-wp-walker.php:244
    Walker::walk()
    wp-includes/nav-menu-template.php:584
    walk_nav_menu_tree()
    wp-admin/includes/nav-menu.php:1077
    wp_get_nav_menu_to_edit()
    wp-admin/nav-menus.php:512
    Query Monitor

Viewing 15 replies - 16 through 30 (of 36 total)
  • Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @bobotton

    Do you have the PHP fatal error when the latest 2.1.6 UM version is active? Could you share the error log?

    Let me know,
    Thanks!

    Hi @nsinelnikov

    Thanks in advance for your help!

    Here you go:

    WordPress version 5.4.2
    Current theme: Enfold Child (version 1.0) Enfold (version 4.7.4)
    Current plugin: Ultimate Member (version 2.1.6)
    PHP version 7.2.24

    Error Details
    =============
    An error of type E_ERROR was caused in line 59 of the file /home/steady10/public_html/dev-iamca/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php. Error message: Uncaught ArgumentCountError: Too few arguments to function um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /home/steady10/public_html/dev-iamca/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /home/steady10/public_html/dev-iamca/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php:59
    Stack trace:
    #0 /home/steady10/public_html/dev-iamca/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(’38’, Object(WP_Post), 0, Object(stdClass))
    #1 /home/steady10/public_html/dev-iamca/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #2 /home/steady10/public_html/dev-iamca/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /home/steady10/public_html/dev-iamca/wp-content/themes/enfold/framework/php/class-megamenu.php(534): do_action(‘wp_nav_menu_ite…’, ’38’, Object(WP_Post), 0, Object(stdClass))
    #4 /home/steady10/public_html/dev-iamca/wp-includes/class-wp-walker.php(144): avia_bac

    nsinelnikov (@nsinelnikov) you have to add also :
    wp-content/themes/enfold/framework/php/class-megamenu.php(534): do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args, $current_object_id );

    Thanks,
    Didier

    Plugin Author Mykyta Synelnikov

    (@nsinelnikov)

    Hi @bwyderko

    Please check the arguments count here

    /home/steady10/public_html/dev-iamca/wp-content/themes/enfold/framework/php/class-megamenu.php line::534

    Thanks!

    Thread Starter bobotton

    (@bobotton)

    Hello!
    Sorry for the late reply.
    I tried changing args as mentioned but only thing that worked was rolling back to version 2.1.5 (using Rollback plugin), and no error is displayed. Did not change the Avada version or other plugins, just the UM plugin.

    Thread Starter bobotton

    (@bobotton)

    Hello!
    Sorry for the late reply. Copying my reply from other less active thread.
    I tried changing args as mentioned but only thing that worked was rolling back to version 2.1.5 (using Rollback plugin), and no error is displayed. Did not change the Avada version or other plugins, just the UM plugin.

    @nsinelnikov That worked! Thank you!!

    FYI, Enfold devs said they’re aware of this problem and will include the fix in the next release. https://kriesi.at/support/topic/menu-page-on-wp-admin-with-error/

    We had the same error with a site using Avada and Ultimate Member.

    I have tried the changes to see if they will work. Fingers are crossed.

    Props to UM support for sending me the link to this case.

    Just came here to say thank you. Adding $id to wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php:215 fixed my issue.

    Same is happening with Total theme. Everything is up to date.
    We cannot be editing theme files to sort this kind of thing out.

    Will this be addressed in an update?

    UM marked the thread I was previously commenting on as resolved even though it wasn’t. So I’m commenting here now.

    Since updating WordPress and Ultimate Member, I can no longer access the main page’s menu options (both in Appearance and the Customizer). UM blamed the theme provider (Apress), so I worked with them. Ultimately they said it’s a plugin coding issue, not a theme issue. I’m creating a new topic since it was prematurely closed by UM before waiting for my answer. I do not have access to the nav-menu PHP files. Can we please get an update for this? Critical errors on my site are unacceptable.

    Error:
    Error Details
    =============
    An error of type E_ERROR was caused in line 59 of the file /var/www/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php. Error message: Uncaught ArgumentCountError: Too few arguments to function um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /var/www/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /var/www/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php:59
    Stack trace:
    #0 /var/www/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(‘1738’, Object(WP_Post), 0, Object(stdClass))
    #1 /var/www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #2 /var/www/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
    #3 /var/www/wp-content/themes/apress/framework/mega-menus.php(823): do_action(‘wp_nav_menu_ite…’, ‘1738’, Object(WP_Post), 0, Object(stdClass))
    #4 /var/www/wp-includes/class-wp-walker.php(144): ZOLOcodeCoreMegaMenus->start_el(”, Object(WP_Post), 0, Object(stdClass))
    #5 /var/www/wp-includes/class-wp-walker.php(244): Walker->display_element(Object(WP_Post), Array, 0, 0, Array, ”)
    #6 /var/www/wp-incl

    I have the same problem with ultimate member 2.1.6 and Avada 6.2.3

    This was the fix for me. Go to
    wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php

    Change this line:
    php do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args );

    to this
    php do_action( ‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args, $id );

    Hi at all,

    I’ve a similar problem when I go to apparence -> menu whit UM active, and I don’t know how resolve it. ??

    This is my error:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /home/wizit/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /home/wizit/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php:59 Stack trace: #0 /home/wizit/public_html/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(‘236’, Object(WP_Post), 0, Object(stdClass)) #1 /home/wizit/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /home/wizit/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /home/wizit/public_html/wp-content/themes/betheme/functions/theme-mega-menu.php(283): do_action(‘wp_nav_menu_ite…’, ‘236’, Object(WP_Post), 0, Object(stdClass)) #4 /home/wizit/public_html/wp-includes/class-wp-walker.php(144): Walker_Nav_Menu_Edit_Mfn->start_el(”, Object(WP_Post), 0, Object(stdClass)) #5 /home/wizit/public_ in /home/wizit/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php on line 59

    I use
    WordPress v5.4.2
    Astra Theme v2.4.5
    and Ultimate Member v2.1.6

    This error appears on login form

    Fatal error: Uncaught Error: Argument 1 passed to UR_User_Approval::check_status_on_login() must be an instance of WP_User, string given, called in /home/storage/8/48/e3/centralef2/public_html/wp-includes/class-wp-hook.php on line 287
    in /home/storage/8/48/e3/centralef2/public_html/wp-content/plugins/user-registration/includes/class-ur-user-approval.php on line 170

    Call stack:

    UR_User_Approval::check_status_on_login()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/plugin.php:206
    apply_filters()
    wp-content/plugins/ultimate-member/includes/core/um-actions-login.php:71
    um_submit_form_errors_hook_login()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-content/plugins/ultimate-member/includes/core/um-actions-form.php:201
    um_submit_form_errors_hook()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-content/plugins/ultimate-member/includes/core/class-form.php:459
    um\c\Form::form_init()
    wp-includes/class-wp-hook.php:287
    WP_Hook::apply_filters()
    wp-includes/class-wp-hook.php:311
    WP_Hook::do_action()
    wp-includes/plugin.php:478
    do_action()
    wp-includes/template-loader.php:13
    require_once()
    wp-blog-header.php:19
    require()
    index.php:17
    Query Monitor

    • This reply was modified 4 years, 7 months ago by cascopel.
    • This reply was modified 4 years, 7 months ago by cascopel.

    Hi @nsinelnikov, I’m using Enfold 4.7.5 and UM 2.1.6. I have tried changing $id to $current_object_id but still getting a fatal error. I have deactivated all other plugins.

Viewing 15 replies - 16 through 30 (of 36 total)
  • The topic ‘Fatal error when going to Menu’ is closed to new replies.