• Hi,
    I have installed wordpress 3.4.2 in my localhost server. I am using wordpress theme “twentyten”. I am trying to create a chiled theme. I am creating custom menu. But when i tried to remove existing “primary” menu from it, this Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'tnc-remove_default_menu' not found or invalid function name in D:\xampp\htdocs\wordpress\wp-includes\plugin.php on line 403
    showed up on my admin page. can anyone solve this problem??!!

    Thanks,
    Naqib

Viewing 10 replies - 1 through 10 (of 10 total)
  • How are you removing the existing primary menu?

    It sounds like you’re removing the function without removing the call to the function. I would recommend not removing the function at all and just remove the call to the function. Do this by using the “remove_action” method – look for the “add_action” that is adding the code, copy that, paste it into your functions.php and replace “add_action” with “remove_action” – that should do it.

    David is right, it is just a call to a function that no longer exists,

    we have been solving this particular issue for a few clients, just locate that call (add_action for example) and remove it or comment it out.

    See here for a more detailed explanation:
    https://developer.infoymas.com/wordpress/warning-call_user_func_array-expects-parameter-1/

    Hello,
    I get an issue when I try to implement a custom menu.
    I get this issue:
    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘fb_add_search_box’ not found or invalid function name in /homepages/41/d455375051/htdocs/wordpress/wordpress/wp-includes/plugin.php on line 173

    Do you have any idea to help me?

    Thanks a lot,

    Pierre

    Hello Pierre, in this case the same error is telling you where to look… The ‘fb_add_search_box’ doesn’t exists or was deleted on your functions, though producing this error,

    Search trough the code where you’re defining the custom menu and find the reference for ‘fb_add_search_box’ and just delete it. you will probably not need this callback for a custom menu.

    If you’re not sure what to do let me know more details about your menu code so I can help you

    Hello Adrian,

    Thank you for your help! I thought to do it, but I was too lazy to search in all files. I finally found it, and it works perfectly!

    Have a nice day!

    Pierre

    Nice to hear Pierre!

    I have a similar problem. I am intermittently getting this error message:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘solostream_theme_js’ not found or invalid function name in /home/kassassi/public_html/wp-includes/plugin.php on line 403

    How would I resolve this?

    Hello mkassy, seems is the exact same problem that pierre had. You have to search on your functions.php file for the string ‘solostream_theme_js’, probably is referring to a function that no longer exists.

    If this is the case (you get only one string on the code), just set the callback empty (”) so the function doesn’t try to find ‘solostream_theme_js’ on every page load

    Hi All, I just installed the plug in all in one seo professional on my site and when I actived it, this error now comes up.

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘__return_true’ not found or invalid function name in /home2/massagei/public_html/wp-includes/plugin.php on line 166

    Fatal error: Call to undefined function get_current_screen() in /home2/massagei/public_html/wp-content/plugins/all-in-one-seo-pack-pro/aioseop_module_class.php on line 622

    I can’t even log in to the admin area and not really sure how to fix it even after reading the above posts?
    thank you
    Adam

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning: call_user_func_array() expects parameter 1 to be a valid callback, func’ is closed to new replies.