Title: Error nav menu.php
Last modified: June 5, 2020

---

# Error nav menu.php

 *  Resolved [sels2012](https://wordpress.org/support/users/sels2012/)
 * (@sels2012)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/)
 * When installing the plugin everything is fine, however when entering the internal
   menu of the wordpress to create or modify menus on the page I get that there 
   has been a fatal error.
 * Error information:
 * WordPress versión 5.4.1
    Tema actual: Salient (versión 11.0.4) Plugin actual:
   Ultimate Member (versión 2.1.6) PHP versión 7.3.17
 * What I can do?
    thanks
 * Detalles del error
    ================== Se ha producido un error del tipo E_ERROR
   en la línea 59 del archivo /home/az70e2mygyzz/public_html/wp-content/plugins/
   ultimate-member/includes/admin/core/class-admin-navmenu.php. Mensaje de error:
   Uncaught ArgumentCountError: Too few arguments to function um\admin\core\Admin_Navmenu::
   wp_nav_menu_item_custom_fields(), 4 passed in /home/az70e2mygyzz/public_html/
   wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /home/az70e2mygyzz/
   public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-
   navmenu.php:59 Stack trace: #0 /home/az70e2mygyzz/public_html/wp-includes/class-
   wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(
   0, Object(WP_Post), 0, Object(stdClass)) #1 /home/az70e2mygyzz/public_html/wp-
   includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /home/
   az70e2mygyzz/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)#
   3 /home/az70e2mygyzz/public_html/wp-content/themes/salient/nectar/assets/functions/
   wp-menu-custom-items/walker-nav-menu-edit.php(67): do_action(‘wp_nav_menu_ite…’,
   0, Object(WP_Post), 0, Object(stdClass)) #4 /home/az70e2mygyzz/public_html/wp-
   content/themes/salient/nectar/assets/functions/wp-menu

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12942152)
 * Hi [@sels2012](https://wordpress.org/support/users/sels2012/),
 * Please re-install [2.1.6 version from wp.org](https://wordpress.org/plugins/ultimate-member/).
   There was an issue and we have added a hotfix.
    You can unzip files to your server/
   wp-content/plugins/ultimate-member folder or delete and install Ultimate member
   via Dashboard-> Plugins tab.
 * Let me know if it helps.
    Thanks!
 *  Thread Starter [sels2012](https://wordpress.org/support/users/sels2012/)
 * (@sels2012)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12943896)
 * The error keeps popping up, it conflicts with the installed theme: “Salient”.
   
   Any other solution? Thank you.
 * [https://ibb.co/zmGjkJK](https://ibb.co/zmGjkJK)
    In the following link you can
   see the error. There has been a critical error on your website.
 *  [Supervreni](https://wordpress.org/support/users/supervreni/)
 * (@supervreni)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12943960)
 * i have the same problem and the re-install doesn’t work. 🙁
 *  [Larry Daniele](https://wordpress.org/support/users/larrydaniele/)
 * (@larrydaniele)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12945618)
 * I’m also seeing the same problem with the Ultimate Member v2.1.6 “hotfix” on 
   an up-to-date WordPress installation and the popular Avada theme. Reverting back
   to UM v2.1.5 works around the problem for now.
 * > Fatal error: Uncaught ArgumentCountError: Too few arguments to function um\
   > admin\core\Admin_Navmenu::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/ultimate-member/includes/admin/core/class-admin-navmenu.php:59
   > Stack Trace
   >  1. um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(‘
   > 164’, Object(WP_Post), 0, Object(stdClass)) /wp-includes/class-wp-hook.php:
   > 287 2. WP_Hook->apply_filters(NULL, Array) /wp-includes/class-wp-hook.php:311
   > 3. WP_Hook->do_action(Array) /wp-includes/plugin.php:478 4. do_action(‘wp_nav_menu_ite…’
   > in /home/holycowom/public_html/www.VillageHillCommunity.org/wp-content/plugins/
   > ultimate-member/includes/admin/core/class-admin-navmenu.php on line 59 /wp-
   > content/themes/Avada/includes/class-avada-nav-walker-megamenu.php:215
 *  [spounch](https://wordpress.org/support/users/spounch/)
 * (@spounch)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12946868)
 * Hello. When updating the latest version of ‘Ultimate-Member’ (version (2.1.6)),
   the WordPress menu no longer works.
 * When I deactivate ‘Ultimate-Member’ the menu appears again.
 * Thank you for your support.
 * ——————–
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function
   um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /var/
   www/clients/client1/web2/web/wp-includes/class-wp-hook.php on line 287 and exactly
   5 expected in /var/www/clients/client1/web2/web/wp-content/plugins/ultimate-member/
   includes/admin/core/class-admin-navmenu.php:59 Stack trace: #0 /var/www/clients/
   client1/web2/web/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu-
   >wp_nav_menu_item_custom_fields(‘1863’, Object(WP_Post), 0, Object(stdClass))#
   1 /var/www/clients/client1/web2/web/wp-includes/class-wp-hook.php(311): WP_Hook-
   >apply_filters(NULL, Array) #2 /var/www/clients/client1/web2/web/wp-includes/
   plugin.php(478): WP_Hook->do_action(Array) #3 /var/www/clients/client1/web2/web/
   wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php(215): do_action(‘
   wp_nav_menu_ite…’, ‘1863’, Object(WP_Post), 0, Object(stdClass)) #4 /var/www/
   clients/client1/web2/web/wp-includes/class-wp-walker.php(144): Avada_Nav_Walk
   in /var/www/clients/client1/web2/web/wp-content/plugins/ultimate-member/includes/
   admin/core/class-admin-navmenu.php on line 59
 *  [rouanvan](https://wordpress.org/support/users/rouanvan/)
 * (@rouanvan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12949638)
 * I’ve got the same problem as sels2012.
    plugins/ultimate-member/includes/admin/
   core/class-admin-navmenu.php on line 59 Please advise
 * Version 2.1.6 didnt work
    Reverting back to a backup of 2.1.1 is working for 
   now
    -  This reply was modified 5 years, 11 months ago by [rouanvan](https://wordpress.org/support/users/rouanvan/).
      Reason: Possible interim resolution added
 *  Thread Starter [sels2012](https://wordpress.org/support/users/sels2012/)
 * (@sels2012)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12950907)
 * reverting to version 2.1.5 works, so far no errors found, everything in order.
 *  Plugin Support [Ultimate Member Support](https://wordpress.org/support/users/ultimatemembersupport/)
 * (@ultimatemembersupport)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12953315)
 * Hi [@sels2012](https://wordpress.org/support/users/sels2012/),
 * Please check this line in your theme
    wp-content/themes/Avada/includes/class-
   avada-nav-walker-megamenu.php:215
 * There is the same issue with Enfold theme and all themes which use MegaMenu PHP
   library. WP native hook contains 5 arguments here:
 * wp-admin/includes/class-walker-nav-menu-edit.php
 * `do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args,
   $id );`
 * But MegaMenu library uses the same hook ‘wp_nav_menu_item_custom_fields’ but 
   with 4 arguments only.
 * `do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );`
 * It looks as a conflict of MegaMenu and WP >= 5.4
 * There is $current_object_id argument in start_el() function, please add it to
   this line:
 * `do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args,
   $current_object_id );`
 * To make your MegaMenu themes compatible
 * Let me know how it works,
    Thanks!
 *  [fbiberger](https://wordpress.org/support/users/fbiberger/)
 * (@fbiberger)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12955439)
 * Sorry my first answer has been too fast. Will investigate further and update.
    -  This reply was modified 5 years, 11 months ago by [fbiberger](https://wordpress.org/support/users/fbiberger/).
    -  This reply was modified 5 years, 11 months ago by [fbiberger](https://wordpress.org/support/users/fbiberger/).
 *  [fbiberger](https://wordpress.org/support/users/fbiberger/)
 * (@fbiberger)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12956185)
 * The Uncode theme seems to have similar issues (due to using megamenu in same 
   way) as well. This line seems to be the problematic one:
 *  `wp-content/themes/uncode/core/inc/edit_custom_walker.php:197`
 * If you change it to this:
 * `do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args,
   $parent_mega);`
 * the problems disappear. Does look a bit shady to me, though. If you have a better
   solution it would be very welcome.
 *  Plugin Author [Mykyta Synelnikov](https://wordpress.org/support/users/nsinelnikov/)
 * (@nsinelnikov)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12964664)
 * Hi [@fbiberger](https://wordpress.org/support/users/fbiberger/)
 * Thanks for letting us know. If you could report this issue to your theme’s support
   team, it will be great.
 * I guess `$parent_mega` is the 5th attribute of the function where do_action is
   situated. If it’s right – then it will work properly.
 * Best Regards
 *  [justryuz](https://wordpress.org/support/users/justryuz/)
 * (@justryuz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-12972836)
 * Hi
 * Same with me, but found a solution to re-install from Ultimate Member 2.1.6 to
   2.1.5 ([https://github.com/ultimatemember/ultimatemember/releases/tag/2.1.5](https://github.com/ultimatemember/ultimatemember/releases/tag/2.1.5))
   move in CPanel/WHM/Server /wp-content/plugin/ and replace 2.1.5 file in the plugin
   folder
 * Done. Solve for error
 * Thanks
 *  [trachalakis](https://wordpress.org/support/users/trachalakis/)
 * (@trachalakis)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-13000772)
 * **On Avada theme 6.2.3** if change on
 * wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php:215
 * this part of the code (line:215)
    <?php do_action( ‘wp_nav_menu_item_custom_fields’,
   $item_id, $item, $depth, $args ); ?>
 * and put this piece of code
    <?php do_action( ‘wp_nav_menu_item_custom_fields’,
   $item_id, $item, $depth, $args, $current_object_id ); ?>
 * even Version Ultimate Member 2.1.6 plays everything right.
 * Thanks “Ultimate Member Support “
 *  [woodyargentina](https://wordpress.org/support/users/woodyargentina/)
 * (@woodyargentina)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-13237367)
 * Hi! I´m very very very happy!!! in Theme beTheme, I have the same problem with
   menu, the Solution:
 * wp-content/themes/betheme/functions/theme-mega-menu.php
 * Edit line:
 * do_action(‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args);
 * for this:
 * do_action(‘wp_nav_menu_item_custom_fields’, $item_id, $item, $depth, $args, $
   current_object_id);
 * Thanks for this!

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Error nav menu.php’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [menu nav](https://wordpress.org/support/topic-tag/menu-nav/)

 * 14 replies
 * 11 participants
 * Last reply from: [woodyargentina](https://wordpress.org/support/users/woodyargentina/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/error-nav-menu-php/#post-13237367)
 * Status: resolved