Skip to:
Content
Pages
Categories
Search
Top
Bottom

Warning: call_user_func_array() expects parameter 1 to be a valid callback


  • Garydock
    Participant

    @garydock

    Hello, I previously had buddypress installed, and have decided to instal it once again to one of my sites.

    I am reciving this message at the top of my site when installed.

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

    I have tried to find a solution and to what I understand it is a function which may no longer exist.

    Can anyone help me find this code to alter? Do I just remove it once found or should I just change something?

    Thanks

Viewing 20 replies - 1 through 20 (of 20 total)

  • Garydock
    Participant

    @garydock

    This is the code I can see at the path of wp-includes/plugin.php on line 496;

    call_user_func_array($the_[‘function’], array_slice($args, 0, (int) $the_[‘accepted_args’]));


    danbp
    Participant

    @danbp

    it’s a template redirection error. You have to isolate the culprit.

    Deactivate all plugins exept BP and activate Twenty Fifteen or Forteen, evtl. remove any custom code from bp-custom.ph (if you se this file). Then reactivate one by one untill you find something.


    Garydock
    Participant

    @garydock

    Hi danbp, thanks for getting back to me.

    I have deactivated all plugins other than BuddyPress, I then switched to the Twenty Fifteen Theme, the message was still there.

    I then deactivated BP and removed all files in my directory. The message dissapeared.

    I then attempted to reinstal BP on the Twenty Fifteen again without activating any other plugins and the message reappeared again.

    Im not sure where the bp-custom.ph file is if you could help me that would be great, even then I’m not sure what kind of code I would be looking for. As far as I can tell there is no corruption, it just shows this warnning at the top of my header on all themes, is there any way to hide it?

    Kind Regards

    Gary


    Garydock
    Participant

    @garydock

    I have found this which suggests it could be also related to plugins authors that declared a function on a previous version of their plugin and then on a newest version they delete it but forget to delete the action related. I don’t have any idea where this could be, if anyone can help or suggest a way to get rid of all buddypress history to try a new instal.

    I also tried installing an older version and still had the same warning.


    Garydock
    Participant

    @garydock


    Garydock
    Participant

    @garydock

    I’m not sure if this is valuable information. I’ve used firebug to try and locate a file where I can remove this or something and this is all I can see but I don’t know if its related. I just want to remove this warning whatever way possible, everything else seems to all be working ok. activity bp-user my-activity my-account just-me buddypress page page-id-0 page-parent page-template-default logged-in custom-background js woocommerce.


    Garydock
    Participant

    @garydock

    Can anyone help with this? I have tried to even delete bp tables and then reinstal buddypress and still no luck. Is it hopeless for Buddypress? How do I completely remove all traces of buddypress for sure so I can fresh instal?

    Kind Regards


    shanebp
    Moderator

    @shanebp

    Try deactivating woocommerce.

    Try updating to latest versions of WP & woocommerce.


    Garydock
    Participant

    @garydock

    Hi Shane, I previously deactivated all other plugins except buddypress and had the same warning on my header. I then tried to change themes with the same problem. I have updated all plugins including woocommerce and wp.

    any idea where I would be able to find this issue and remove this warning? I’m really stuck.

    Thanks


    shanebp
    Moderator

    @shanebp

    It can be a tricky one to track down – as you’ve noted.
    I have no other suggestions, except…

    Meanwhile – it is just a warning.
    You won’t see it if debug is turned off in wp-config.php.
    You should not leave debug turned on, on a production (live) site.


    Garydock
    Participant

    @garydock

    Hi Shane, I currently have define(‘WP_DEBUG’, false); in my wp-config.php and the warning still is displayed. not on the admin but always when viewing from the front end above the header menu. Is there any other way to remove this warning that you could help me with?

    Thanks


    Garydock
    Participant

    @garydock

    One other thing to mention is that I previously ran the site on multisite, but due to some plugins which are not compatable I wanted to remove ms, however i may have cut a corner which was by cltering the code:
    define(‘WP_ALLOW_MULTISITE’, true);
    define(‘MULTISITE’, false);
    define(‘SUBDOMAIN_INSTALL’, true);
    define(‘DOMAIN_CURRENT_SITE’, ‘”site”‘);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

    “define(‘MULTISITE’, false);” being the change to alse, which allows my plugins to work without completely removing multisite. I’m not sure this could be linked but im ulling at short strings here.


    shanebp
    Moderator

    @shanebp

    If debug is turned off, then you also have a php setting somewhere set to display verbose messages.

    Maybe something like: @ini_set('display_errors', 1);

    Where? I don’t know.
    Check your php.ini file


    danbp
    Participant

    @danbp

    @shanebp, do we have another OMG Pizza bug here ?
    https://buddypress.org/support/topic/warning-of-buddypress/


    @djpaul
    , @imath, @hnla opinion welcome !


    Garydock
    Participant

    @garydock

    If you guys can help me fix this I’ll get you the best pizza in town! 😛


    danbp
    Participant

    @danbp

    If you now use a single install, it would better you remove any constant related to MS from wp-config.

    All given define noticed above may be removed.
    You have also a different htaccess when MS or single WP is running.

    Is issue on a local install or live ?


    Garydock
    Participant

    @garydock

    Hi the issue is on a live instal. I’m not entirely confident to uninstal ms as I have quite a lot of data and havent been able to find a good tutorial. I also dont have my original htaccess code to use which I had before ms instal.


    Garydock
    Participant

    @garydock

    I have checked my php.ini and see all kinds of error code in there, biut not sure what to alter to remove warning and I cant copy the code here.


    Garydock
    Participant

    @garydock

    I see this :

    ; Print out errors (as a part of the output). For production web sites,
    ; you’re strongly encouraged to turn this feature off, and use error logging
    ; instead (see below). Keeping display_errors enabled on a production web site
    ; may reveal security information to end users, such as file paths on your Web
    ; server, your database schema or other information.
    display_errors = On

    should I replace on with off?


    Boone Gorges
    Keymaster

    @boonebgorges

    > should I replace on with off?

    Yes, and then restart Apache to see the effects. It’s dangerous to have this running on a production site.

    As for your specific issue: check your wp-config.php file to see if you have defined the constant NOBLOGREDIRECT. It probably looks something like define( 'NOBLOGREDIRECT', true );. If you see it there, comment it out.

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