BuddyBoss Home – Web Support Forums Themes Boss. theme bp_core_add_message messages not showing up on this Theme…

Viewing 5 posts - 1 through 5 (of 5 total)
  • Question

    #50511
    @bhagwat-paraggmail-com

    Hello,

    I am adding some hooks and raising error messages using bp_core_add_message and i do not see any of them being displayed on the BOSS Theme.. if i use any other theme the same messages show up? A simole hook i added was to remove certain tabs from the manage group.. this is just an example.. i add BP_CORE_MESSAGE anywhere it does not show up…as soon as i switch the theme it starts showing up..

    
    add_action( 'bp_actions', 'RECN_CUSTOM_remove_group_subnav' );
    
    function RECN_CUSTOM_remove_group_subnav()
    {
    
    if ( ! bp_is_group() || ! ( bp_is_current_action( 'admin' ) && bp_action_variable( 0 ) ) || is_super_admin() ) {
    		return;
    	}
    
    	// Add the admin subnav slug you want to hide in the
    	// following array
    	$hide_tabs = array(
    		'group-settings' => 1,
    		'delete-group' => 1,
    		'forum' =>1,
    	);
    
    	$parent_nav_slug = bp_get_current_group_slug() . '_manage';
    
    	// Remove the nav items
    	foreach ( array_keys( $hide_tabs ) as $tab ) {
    		bp_core_remove_subnav_item( $parent_nav_slug, $tab );
    	}
    
    	// You may want to be sure the user can't access
    	if ( ! empty( $hide_tabs[ bp_action_variable( 0 ) ] ) ) {
    		bp_core_add_message( 'Sorry buddy, but this part is restricted to super admins!', 'error' );
    		bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) );
    	}
    
    	// remove
    
    }
    

    Answers

    #50513
    @bhagwat-paraggmail-com

    Looking more into this it looks like there needs to be a call to

    <?php do_action( ‘template_notices’ ); ?>

    in all the poages for the messages to show up but i do not see that in any of the pages in the BOSS Theme….

    Please let me know how to proceed as i do have a lot of requirements to show errors on the page..

    #50661
    @bhagwat-paraggmail-com

    Hello,

    Was anyone from the BOSS team able to take a look at this thread? I am stuck at this point.

    Thanks,
    Parag

    #50685

    Anonymous
    @

    Hi @bhagwat-paraggmail-com
    Please check buddypress-group-single.php inside boss theme and buddypress.php
    to modify the group header with cover images those template files are called.
    Regards

    #50764
    @bhagwat-paraggmail-com

    Hello @vapvarun

    I already checked that the problem is the messages i add using bp_core_add_message do not show up on the BOSS theme. As a simple test on your side do this.. in your bp-custom.php add the code below. Go to the group creation wizard and when you click create and save it should throw this error up. It does not happen on BOSS theme.. now change the Theme to something else that comes out of the box and test.. you see that the error is showing up on twenty 12 or 15 themes but not in BOSS

    add_action( 'bp_actions', 'RECN_CUSTOM_remove_group_subnav' );
    
    function check_group_name_for_duplicates( $group )
    {
     bp_core_add_message( ' TEST MY ERROR', 'error' );
    }
    add_action( 'groups_group_before_save', 'check_group_name_for_duplicates' );
    
    
Viewing 5 posts - 1 through 5 (of 5 total)
  • The question ‘bp_core_add_message messages not showing up on this Theme…’ is closed to new replies.