WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Groupblog
Ajax Backend Conflict (3 posts)

  1. anindyaray
    Member
    Posted 3 years ago #

    Firstly , A very nice and a must have plugin for WPMU enable BP .
    Issue:
    The theme I'm using is also having an ajax backend , after installing BP-Group Blog Plugin , my themes backend is not working ....

    any solutions Please, would be nice ???

    http://wordpress.org/extend/plugins/bp-groupblog/

  2. utaka
    Member
    Posted 3 years ago #

    WP3.2.1 + BuddyPress1.2.9 + BP Groupblog1.5.
    And.This fix.
    http://wordpress.org/support/topic/plugin-buddypress-groupblog-no-bp-groupblogs-menu-using-wp-31-and-bp-128

    I have the error,too.

    Ex1.Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/wp-includes/ms-blogs.php **
    Ex2. redirect loop
    Ex3. Dashboard > Network Admin > Sites
    Path / is Two. New / I delete New /. if you have two / , you delete New /.
    Normally it operates, and it becomes an error at times. Operation is unstable.

    Cause, maybe..
    ・ Mistake of your BuddyPress Theme .
    ・ /bp-groupblog/groupblog/js/general.js doesn't operate normally.

    Example. My Theme . Source code ,<head>...</head>. I found..

    <script type='text/javascript' src='http://****/wp-includes/js/l10n.js?ver=20101110'></script>
    <script type='text/javascript' src='http://***/wp-content/plugins/bp-groupblog/groupblog/js/general.js?ver=3.2.1'></script>
    <script type='text/javascript' src='http://****/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
    <script type='text/javascript' src='http://****/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=3.2.1'></script>

    This Case don't work.
    "/bp-groupblog/groupblog/js/general.js?ver=3.2.1'" should be at the end.

    <script type='text/javascript' src='http://****/wp-includes/js/l10n.js?ver=20101110'></script>
    <script type='text/javascript' src='http://****/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
    <script type='text/javascript' src='http://****/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js?ver=3.2.1'></script>
    <script type='text/javascript' src='http://***/wp-content/plugins/bp-groupblog/groupblog/js/general.js?ver=3.2.1'></script>

    This Case work.

    FIX can be done by two methods.The order of reading JavaScrit is changed.

    *Method1: FIX In Your BuddyPress Theme.
    ・wp-content/themes/your_Bptheme/header.php
    ・wp-content/themes/your_Bptheme/buddypress/functions-buddypress.php

    My Case: in functions-buddypress.php

    #
    ##--- Find -------------
    #
    /* Load the BuddyPress javascript and css */
    /* We use !bp_is_blog_page() here to only load the JS and CSS on BuddyPress pages to save on load time */
    /* We want to load the adminbar css on all pages so it has been taken out of the if statement */
    /* We are going to load the JS from the BuddyPress plugin directory so we always use the latest version */
    function theme_loaded_init() {
    	if (!bp_is_blog_page()) {
    		wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) );
    
    		}
    		wp_enqueue_style( 'buddypressadminbar', MY_THEME_URL . '/buddypress/style-adminbar.css', false, '0.1', 'screen' );
    		wp_enqueue_style( 'buddypress', MY_THEME_URL . '/buddypress/style-****.css', false, '0.1', 'screen' );
    	}
    
    add_action('wp_head', 'theme_loaded_init', 5);
    
    #
    ##--- Replace -------------
    #
    add_action('wp_head', 'theme_loaded_init', 5);
    
    #
    ##--- With  -------------
    #
    
    add_action('template_redirect', 'theme_loaded_init', 0);

    ------------------------------------------------------------
    *Method2: FIX In
    ・wp-content/plugins/bp-groupblog/bp-groupblog-cssjs.php

    #
    ##--- Find -------------
    #
    function bp_groupblog_add_js() {
      global $bp;
    
    	if ( $bp->current_component == $bp->groups->slug && ( ('group-blog' == $bp->action_variables[0]) || ('group-blog' == $bp->action_variables[1]) ) )
    	  if ( file_exists( STYLESHEETPATH . '/groupblog/js/general.js' ) )
    			wp_enqueue_script( 'bp-groupblog-js', get_stylesheet_directory_uri() . '/groupblog/js/general.js' );
    		else
    		  wp_enqueue_script( 'bp-groupblog-js', WP_PLUGIN_URL . '/bp-groupblog/groupblog/js/general.js' );
    }
    add_action( 'template_redirect', 'bp_groupblog_add_js', 1 );
    
    #
    ##--- Replace -------------
    #
    add_action( 'template_redirect', 'bp_groupblog_add_js', 1 );
    
    #
    ##--- With  -------------
    #
    add_action( 'wp_head', 'bp_groupblog_add_js', 6 );

    6 is
    My "add_action('wp_head', 'theme_loaded_init', 5) in My Bptheme/buddypress/functions-buddypress.php.

    I am no good english ,sorry..

  3. reblevins
    Member
    Plugin Author

    Posted 3 years ago #

    Hi there,
    Thanks utaka for posting this fix. I'm not the javascript guru, so I'll leave it to the other contributors to see what needs to be done.

    Rodney

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic