Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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))

    #1221215

    Hey,

    Could you please post WP admin logins here privately so we can look into it?

    Regards,
    Yigit

    #1221249

    Thanks Yigit !

    #1221583

    Hello Yigit,

    I have the same problem.
    Can you post the solution in clear text?
    Thanks and regards
    Luigi

    #1221721

    Hi guys,

    Please check this line in your theme
    wp-content/themes/enfold/framework/php/class-megamenu.php: 534

    The 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

    #1222256

    I 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.18

    Error 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_el

    #1222258

    Hi @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 line

    do_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

    #1222682

    Thanks @BigBatT
    it worked !

    #1222685

    Hi,


    @bigbatt
    Thanks for your help!

    Our devs have already fixed this issue and it will be included in upcoming version :)

    Regards,
    Yigit

    #1223494

    Hi @nerohm
    I’m glade to help you ;)


    @yigit
    perfect!
    I suggest you to consider directly updating the various issues, for example how WordPress applies patches to solve minor problems (Hotfix Patch Deployment)
    Regards
    Luigi

    #1223506

    Hey Nerohm,

    Did you need additional help on this topic or shall it be closed?

    Best regards,
    Jordan Shannon

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.