WordPress.org

Ready to get started?Download WordPress

Forums

Warning: call_user_func_array() expects parameter 1 to be a valid callback, func (11 posts)

  1. naqib83
    Member
    Posted 1 year ago #

    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

  2. Max
    Member
    Posted 1 year ago #

    How are you removing the existing primary menu?

  3. david.bailey
    Member
    Posted 1 year ago #

    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.

  4. adrianifero
    Member
    Posted 1 year ago #

    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:
    http://developer.infoymas.com/wordpress/warning-call_user_func_array-expects-parameter-1/

  5. pierrerodriguez
    Member
    Posted 1 year ago #

    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

  6. adrianifero
    Member
    Posted 1 year ago #

    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

  7. pierrerodriguez
    Member
    Posted 1 year ago #

    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

  8. adrianifero
    Member
    Posted 1 year ago #

    Nice to hear Pierre!

  9. mkassy
    Member
    Posted 1 year ago #

    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?

  10. adrianifero
    Member
    Posted 1 year ago #

    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

  11. aarnold1
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic