WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress-Ajax-Chat
buddypress ajax chat error "The page is not redirecting properly (18 posts)

  1. julien760
    Member
    Posted 2 years ago #

    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/

  2. TrueFlyingCow
    Member
    Posted 2 years ago #

    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?

  3. TrueFlyingCow
    Member
    Posted 2 years ago #

    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 );
  4. Sapan Shah
    Member
    Posted 2 years ago #

    Thanks @TrueFlyingCow for this wonderful tip... the chat (and Admin) now works after commenting the line :-)

  5. Dan O'Keefe
    Member
    Posted 2 years ago #

    thx for this very helpful

  6. alhoseany
    Member
    Posted 2 years ago #

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

  7. terjebh
    Member
    Posted 2 years ago #

    Solved my problem, thanx a million!

  8. lionheart2308
    Member
    Posted 2 years ago #

    Hi,

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

    thank you

  9. alhoseany
    Member
    Posted 2 years ago #

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

    i dont know about this one
    bp_chat_load_buddypress

  10. alhoseany
    Member
    Posted 2 years ago #

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

  11. lionheart2308
    Member
    Posted 2 years ago #

    yes thank you i find it.

    very much appreciated alhoseany

  12. bttrknwyerrol
    Member
    Posted 2 years ago #

    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

  13. alhoseany
    Member
    Posted 2 years ago #

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

  14. bttrknwyerrol
    Member
    Posted 2 years ago #

    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

  15. bttrknwyerrol
    Member
    Posted 2 years ago #

  16. bttrknwyerrol
    Member
    Posted 2 years ago #

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

  17. lionheart2308
    Member
    Posted 2 years ago #

    hi bttrknwyerrol,

    you're taking the hard road. why re installing again WP & Bp?
    Simply FTP & backup your files & folders thaat resides under ur httpdocs
    while installing any new plugins, if u encounter any issues or the site goes down, u can simply connect over FTP & restore ur backed up files.

    cheers.

  18. gkdreamz
    Member
    Posted 2 years ago #

    thanks @TrueFlyingCow.. nice tip

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic