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.17What I can do?
thanksDetalles 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
-
Hi @sels2012,
Please re-install 2.1.6 version from wp.org. 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!The error keeps popping up, it conflicts with the installed theme: “Salient”.
Any other solution?
Thank you.https://ibb.co/zmGjkJK
In the following link you can see the error.
There has been a critical error on your website.i have the same problem and the re-install doesn’t work. 🙁
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:215Hello. 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 59I’ve got the same problem as sels2012.
plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php on line 59
Please adviseVersion 2.1.6 didnt work
Reverting back to a backup of 2.1.1 is working for now- This reply was modified 3 years, 10 months ago by rouanvan. Reason: Possible interim resolution added
reverting to version 2.1.5 works, so far no errors found, everything in order.
Hi @sels2012,
Please check this line in your theme
wp-content/themes/Avada/includes/class-avada-nav-walker-megamenu.php:215There 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!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.
Hi @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
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) move in CPanel/WHM/Server /wp-content/plugin/ and replace 2.1.5 file in the plugin folder
Done. Solve for error
Thanks
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 “
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!
- The topic ‘Error nav menu.php’ is closed to new replies.