Tagged: menu
-
AuthorPosts
-
June 10, 2020 at 2:09 pm #1221198
Hi, can you guys give some help? plugin autors says the problem is with some outdated hooks in Enfold
type of error E_ERROR caused on line 59 of the file /home4/exxome93/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php. Mensagem de erro: Uncaught ArgumentCountError: Too few arguments to function um\admin\core\Admin_Navmenu::wp_nav_menu_item_custom_fields(), 4 passed in /home4/exxome93/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /home4/exxome93/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php:59
Stack trace:
#0 /home4/exxome93/public_html/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(’98’, Object(WP_Post), 0, Object(stdClass))
#1 /home4/exxome93/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /home4/exxome93/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /home4/exxome93/public_html/wp-content/themes/enfold/framework/php/class-megamenu.php(534): do_action(‘wp_nav_menu_ite…’, ’98’, Object(WP_Post), 0, Object(stdClass))
#4 /home4/exxome93/public_html/wp-includes/class-wp-walker.php(144): avia_backend_walker->start_el(”, Object(WP_Post), 0, Object(stdClass))June 10, 2020 at 2:49 pm #1221215Hey,
Could you please post WP admin logins here privately so we can look into it?
Regards,
YigitJune 10, 2020 at 4:01 pm #1221249Thanks Yigit !
June 11, 2020 at 9:48 am #1221583Hello Yigit,
I have the same problem.
Can you post the solution in clear text?
Thanks and regards
LuigiJune 11, 2020 at 3:25 pm #1221721Hi guys,
Please check this line in your theme
wp-content/themes/enfold/framework/php/class-megamenu.php: 534The 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.phpdo_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
June 13, 2020 at 1:36 am #1222256I have confirmed the same error on 3 enfold sites I support on 3 different servers. In all the cases, they all have the same issue and when editing the menu you get an error. Below are the details. Will there be a patch or update soon?
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.4.2
Current theme: Enfold (version 4.7.5)
Current plugin: Ultimate Member (version 2.1.6) PHP version 7.3.18Error Details
=============
An error of type E_ERROR was caused in line 59 of the file /home/xxxxxx/public_html/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/xxxxxx/public_html/wp-includes/class-wp-hook.php on line 287 and exactly 5 expected in /home/xxxxxx/public_html/wp-content/plugins/ultimate-member/includes/admin/core/class-admin-navmenu.php:59
Stack trace:
#0 /home/xxxxxx/public_html/wp-includes/class-wp-hook.php(287): um\admin\core\Admin_Navmenu->wp_nav_menu_item_custom_fields(’54’, Object(WP_Post), 0, Object(stdClass))
#1 /home/xxxxxx/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#2 /home/xxxxxx/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /home/xxxxxx/public_html/wp-content/themes/enfold/framework/php/class-megamenu.php(534): do_action(‘wp_nav_menu_ite…’, ’54’, Object(WP_Post), 0, Object(stdClass))
#4 /home/xxxxxx/public_html/wp-includes/class-wp-walker.php(144): avia_backend_walker->start_elJune 13, 2020 at 2:03 am #1222258Hi @ronduring,
Read my previous post, I have posted a solution.
Please check this line in your theme
wp-content/themes/enfold/framework/php/class-megamenu.php: 534
Change this linedo_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args );
To
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args, $current_object_id );
Regards
June 15, 2020 at 3:38 pm #1222682Thanks @BigBatT
it worked !June 15, 2020 at 3:43 pm #1222685Hi,
@bigbatt Thanks for your help!Our devs have already fixed this issue and it will be included in upcoming version :)
Regards,
YigitJune 17, 2020 at 9:27 pm #1223494June 17, 2020 at 11:05 pm #1223506Hey Nerohm,
Did you need additional help on this topic or shall it be closed?
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.