Alright, so after some random testing I believe I’ve found where the issue comes from. It’s in the file “bp-chat.php”, within the function “bp_chat_load_buddypress”. Specifically, there’s a line:
wp_redirect( get_bloginfo(‘wpurl’) . ‘/wp-admin/plugins.php’ );
If I comment out that line (add “//” in front), then I can access the admin page, and chat plugin still seems to work everywhere else.
Here’s the code around that area, with the redirect line commented out. Anybody know what all this stuff does, or how it’s supposed to be? This function is supposed to check that buddypress is loaded, else the plugin shouldn’t be active. But in my case, I know buddypress is active so if this function were working correctly, it wouldn’t get to the redirect line at the end, so something is broken in the function.
However, I feel that you can probably comment out the redirect line if you’re sure to disable this plugin before updating and/or disabling buddypress.
function bp_chat_load_buddypress() {
if ( function_exists( 'bp_core_setup_globals' ) )
return true;
/* Get the list of active sitewide plugins */
$active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
if ( isset( $active_sidewide_plugins['buddypress/bp-loader.php'] ) && !function_exists( 'bp_core_setup_globals' ) ) {
require_once( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
return true;
}
/* If we get to here, BuddyPress is not active, so we need to deactive the plugin and redirect. */
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( file_exists( ABSPATH . 'wp-admin/includes/mu.php' ) )
require_once( ABSPATH . 'wp-admin/includes/mu.php' );
deactivate_plugins( basename(__FILE__), true );
if ( function_exists( 'deactivate_sitewide_plugin') )
deactivate_sitewide_plugin( basename(__FILE__), true );
// wp_redirect( get_bloginfo('wpurl') . '/wp-admin/plugins.php' );
}
add_action( 'plugins_loaded', 'bp_chat_load_buddypress', 11 );