Skip to:
Content
Pages
Categories
Search
Top
Bottom

Duplicate Profile Meta Error

  • Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    Hi and thanks for your time..

    My Site
    I’m using the latest WP and BP and bbP
    Built on the RocketTheme Gantry Framework Plugin using the basic theme.

    Getting strange duplication of meta information in the Header Content Div of the Member Profile when logged in and viewing a friend as can be seen in the following image.

    Duplicate Meta Error

    I’m not sure what to do and was wondering if this has been an issue for anyone else.

    Fixing css is one thing but when it comes to js or php…O boy!

    Hope’n for some help and thanks again.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of @mercime
    @mercime
    Keymaster

    @mercime

    @uncle-jimmy first time i’ve seen this issue. Did you check if same issue shows up using BP Default theme or Twenty Twelve theme?

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    @mercime I just switched to the BP Default theme and it was normal, then switched back and it was as seen above again. So it must be something in my rt_gantry_wp theme. I’m familiarizing myself with both the WP codex and the BP codex in hopes of tracking down the issue.

    Also, when a Private or Public message is sent to a friend, it is sent 4 times. Not sure if the issues are connected.

    I’ve set up a Guest account – and would be willing to allow FTP access if interested in poking around in the sub domain.

    Thanks for your time, deeply appreciate you. :)

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    The Guest account [Username = Guest] [Password = guest]

    I was wondering if the [Inspect element] tool of the Browser could be used to track where the duplicate call is being made within the RocketTheme WP Gantry Theme directory?

    The problem appears to be within my Theme Directory and not within Buddypress.

    I see that Buddypress has worked directly with RocketTheme on their Tachyon Theme Template [which is pretty awesome!] so it would seem Buddypress is already familiar with the Gantry Framework that they use.

    Thanks again!

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    Usually this happens when
    do_action( ‘bp_member_header_actions’ ) in member-header.php
    is hooked twice.

    Check your themes functions.php, any template-overrides, etc.,
    for calls to or filters on
    bp_member_header_actions

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    @shanebp First off I want to thank you for your time and let you know how much I appreciate you and Mercime.

    Here’s what I’ve recently found out. I’ve narrowed the problem down to the Gantry Buddypress Plugin – Version 1.3 | By RocketTheme, LLC

    When I deactivated it there were only 3 buttons as it should be, however, I lost my styling.

    Here’s a quick look at the plugin directory for what it’s worth.. :)

    ScreenCapture

    So somewhere in there is the problem. Somewhere. lol

    I’ll use your clues Shane and continue to seek the issue within this plugin, I eagerly look forward to Resolving this issue so you can help anyone else using this Theme/Plugin configuration to find their solution too.

    functions/hooks/calls/filters …[me_O_my!]

    Love ya! :)

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    @shanebp I forgot to answer your question concerning Message-UX plugin, I was not using it and didn’t know about it until you mentioned it. I’ve since installed it and checked it out but it didn’t seem to be working.

    It could be because of the present issue, IDK? I’ll look into it further once We’ve [:o)~] resolved the current issue.

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    @shanebp Because of your clues I was able to locate and RESOLVE this problem. All I did was comment out the code as can be seen in the following image.

    BuddyPress might notify RocketTheme of this issue with their Gantry BuddyPress plugin so future updates can include a resolution to this conflict with their own Basic Gantry Theme and BuddyPress.

    Thanks for all your help folks, I couldn’t get an answer from the Google Forum for Gantry Framework so I really hope this helps somehow.

    Now! On to the next problem under a new Topic! LOL! Good Lord!

    Avatar of Uncle Jimmy
    Uncle Jimmy
    Participant

    @uncle-jimmy

    @Shanebp and @mercime [RESOLVED]

    The following file was responsible. Comments marked !!!IMPORTANT!!! are where I made changes.

    wp-content/plugins/gantry-buddypress/bpt-functions.php

    <?php
    /**
     * @version   1.3 November 8, 2012
     * @author    RocketTheme, LLC http://www.rockettheme.com
     * @copyright Copyright © 2007 - 2012 RocketTheme, LLC
     * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
     */
    
    // Sets up WordPress theme for BuddyPress support.
    function gantry_bp_tpack_theme_setup() {
    	global $bp, $gantry_bp_path;
    
    	// Load the default BuddyPress AJAX functions if it isn't explicitly disabled
    	require_once( $gantry_bp_path . '/_inc/ajax.php' );
    
    	if ( !is_admin() ) {
    		///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED MEMBER HEADER DUPLICATE BUTTONS Friends/Public Message/Private Message]] ///!!!IMPORTANT!!!///
    		///!!!IMPORTANT!!!/// [[ALSO REDUCED QUADRUPAL MESSAGES/COMMENTS/REPLIES TO DUPLICATES]] ///!!!IMPORTANT!!!///
    		// Register buttons for the relevant component templates
    		// Friends button
    		//if ( bp_is_active( 'friends' ) )
    			//add_action( 'bp_member_header_actions',    'bp_add_friend_button' );
    
    		// Activity button
    		//if ( bp_is_active( 'activity' ) )
    			//add_action( 'bp_member_header_actions',    'bp_send_public_message_button' );
    
    		// Messages button
    		//if ( bp_is_active( 'messages' ) )
    			//add_action( 'bp_member_header_actions',    'bp_send_private_message_button' );
    
    		// Group buttons
    		if ( bp_is_active( 'groups' ) ) {
    			///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE GROUP BUTTON Join/Leave ]] ///!!!IMPORTANT!!!///
    			//add_action( 'bp_group_header_actions',     'bp_group_join_button' );
    			add_action( 'bp_group_header_actions',     'bp_group_new_topic_button' );
    			add_action( 'bp_directory_groups_actions', 'bp_group_join_button' );
    		}
    
    		// Blog button
    		if ( bp_is_active( 'blogs' ) )
    			add_action( 'bp_directory_blogs_actions',  'bp_blogs_visit_blog_button' );
    	}
    }
    
    add_action( 'after_setup_theme', 'gantry_bp_tpack_theme_setup', 11 );
    
    // Enqueues BuddyPress JS and related AJAX functions
    function gantry_bp_enqueue_scripts() {
    
    	// Enqueue the global JS - Ajax will not work without it
    	wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), bp_get_version() );
    
    	// Add words that we need to use in JS to the end of the page so they can be translated and still used.
    	$params = array(
    		'my_favs'           => __( 'My Favorites', 'buddypress' ),
    		'accepted'          => __( 'Accepted', 'buddypress' ),
    		'rejected'          => __( 'Rejected', 'buddypress' ),
    		'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
    		'show_x_comments'   => __( 'Show all %d comments', 'buddypress' ),
    		'show_all'          => __( 'Show all', 'buddypress' ),
    		'comments'          => __( 'comments', 'buddypress' ),
    		'close'             => __( 'Close', 'buddypress' ),
    		'view'              => __( 'View', 'buddypress' ),
    		'mark_as_fav'	    => __( 'Favorite', 'buddypress' ),
    		'remove_fav'	    => __( 'Remove Favorite', 'buddypress' ),
    		'unsaved_changes'   => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ),
    	);
    	wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );
    
    	// Maybe enqueue comment reply JS
    	if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    }
    
    add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_scripts');
    
    // Enqueues BuddyPress basic styles
    function gantry_bp_enqueue_styles() {
        global $gantry_bp_url;
    
    	// Do not enqueue CSS if it's disabled
    	if (get_option( 'gantry_bp_disable_css' ))
    		return;
    
    	// BP 1.5+
    	if ( version_compare( BP_VERSION, '1.3', '>' ) ) {
    		$stylesheet = 'bp.css';
    
    		// Bump this when changes are made to bust cache
    		$version    = '20110918';
    	}
    
    	// Add the wireframe BP page styles
    	wp_enqueue_style( 'bp', $gantry_bp_url . '/' . $stylesheet, array(), $version );
    
    	// Enqueue RTL styles for BP 1.5+
    	if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() )
    		wp_enqueue_style( 'bp-rtl',  $gantry_bp_url . '/' . 'bp-rtl.css', array( 'bp' ), $version );
    }
    
    add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_styles');
    
    // Gantry BuddyPress plugin doesn't use bp-default's built-in sidebar login block,
    // so during no access requests, we need to redirect them to wp-login for
    // authentication.
    if (!function_exists('gantry_bp_use_wplogin')) {
        function gantry_bp_use_wplogin() {
    	    // returning 2 will automatically use wp-login
    	    return 2;
        }
    
        add_filter('bp_no_access_mode', 'gantry_bp_use_wplogin' );
    }
    
    // Hooks into the 'bp_get_activity_action_pre_meta' action to add secondary activity avatar support
    function gantry_bp_activity_secondary_avatars( $action, $activity ) {
    	// sanity check - some older versions of BP do not utilize secondary activity avatars
    	if ( function_exists( 'bp_get_activity_secondary_avatar' ) ) :
    		switch ( $activity->component ) {
    			case 'groups' :
    			case 'friends' :
    				// Only insert avatar if one exists
    				if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
    					$reverse_content = strrev( $action );
    					$position        = strpos( $reverse_content, 'a<' );
    					$action          = substr_replace( $action, $secondary_avatar, -$position - 2, 0 );
    				}
    				break;
    		}
    	endif;
    
    	return $action;
    }
    
    ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE AVTIVITY STREAM AVATARS]] ///!!!IMPORTANT!!!///
    ///!!!IMPORTANT!!!/// [[ALSO FIXED DUPLICATE MESSAGES/COMMENTS/REPLIES]] ///!!!IMPORTANT!!!///
    //add_filter('bp_get_activity_action_pre_meta', 'gantry_bp_activity_secondary_avatars', 10, 2);

    Thank you for your time and attention, please let me know if I could’ve done this better.

    God Bless

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

The topic ‘Duplicate Profile Meta Error’ is closed to new replies.