WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Buddypress-Ajax-Chat] buddypress ajax chat error "The page is not redirecting properly

[Plugin: Buddypress-Ajax-Chat] buddypress ajax chat error "The page is not redirecting properly

  • I am using wordpress version 3.2.1 with buddypress version 1.5.1.

    When I activate buddypress ajax chat plugin, the administration area become unavailable with this error in firefox and chrome : The page is not redirecting properly. The website is still available.

    I have to delete the plugin directory to recover access to the adminstration panel.

    What can I do ?

    Thanks,
    Julien

    http://wordpress.org/extend/plugins/buddypress-ajax-chat/

Viewing 15 replies - 1 through 15 (of 17 total)
  • TrueFlyingCow
    Member

    @trueflyingcow

    I have this issue too, with wordpress 3.2.1 and buddypress 1.5

    I like the plugin, it seems to be working okay on the site…but I need to be able to access the dashboard.

    Anybody have suggestions or ideas about which file(s) might be causing the redirects?

    TrueFlyingCow
    Member

    @trueflyingcow

    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 );

    Thanks @trueflyingcow for this wonderful tip… the chat (and Admin) now works after commenting the line 🙂

    thx for this very helpful

    alhoseany
    Participant

    @alhoseany

    i dont know how to thank you for this.
    one tip: comment the line before activating the plugin.

    Solved my problem, thanx a million!

    lionheart2308
    Member

    @lionheart2308

    Hi,

    can anyone tell me where is the exact directory location of the above files:
    “bp-chat.php” & “bp_chat_load_buddypress”

    thank you

    alhoseany
    Participant

    @alhoseany

    wp-content/plugins/bp-chat/bp-chat.php

    i dont know about this one
    bp_chat_load_buddypress

    alhoseany
    Participant

    @alhoseany

    bp_chat_load_buddypress is the words you should look for inbp-chat.php the file

    lionheart2308
    Member

    @lionheart2308

    yes thank you i find it.

    very much appreciated alhoseany

    bttrknwyerrol
    Member

    @bttrknwyerrol

    the chat still doesn’t work for me. great start on finding the problem but when i open the chat it goes to page doesnt exist. what i remember from this plugin is that a facebook looking chat pops up from the top to chat with friends on the site. the shoutout however does work but i disable that feature. i commented the above line and the site at least loads now, but yeah, doesnt actually work off any of the pages i try. perhaps it is a theme error? ill try it on another one of my sites in the mean time while i await response

    alhoseany
    Participant

    @alhoseany

    that happen to me. you need to deactivate, delete plugin files. reinstal and one more step: comment the line before activating the plugin.

    bttrknwyerrol
    Member

    @bttrknwyerrol

    k so i did a fresh install of wordpress, installed buddypress, installed ajaxchat, and before i activated it i commented out the line. same problem. site actually loads and shoutout works, but the chat doesnt seem to work still

    bttrknwyerrol
    Member

    @bttrknwyerrol

    bttrknwyerrol
    Member

    @bttrknwyerrol

    k it was only in google chrome browser that this was happening in. works in every other browser. consider solved

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Buddypress-Ajax-Chat] buddypress ajax chat error "The page is not redirecting properly’ is closed to new replies.