Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Notification – what's wrong here?

  • @dceditore

    Participant

    Hi,

    I just installed BuddyPress and seems to work fine, except for the Notification tab: it appears 2 times, and no notification is shown even if I can see a ‘1’ notification pending.

    Here is sample:

    Thank you for any suggestion,

    Diego

Viewing 17 replies - 1 through 17 (of 17 total)
  • @ubernaut

    Participant

    looks like an unclosed div somewhere

    @mercime

    Participant

    @dceditore I seen someone’s screenshot of the same issue around a year or so ago. WP/BP versions? What theme are you using and what plugins are activated in your installation? Change to the Twenty Fourteen, deactivate all plugins except BuddyPress, and then check if the issue is resolved on that page.

    @dceditore

    Participant

    I’m using wp 4.0 and bp 2.1.1

    @shivam-kumar

    Participant

    Hi i think i know whats happening here i was working on status theme to make it work with the latest versions of both buddypress and wordpress and i faced the similar issue so this is what i did to resolve it goto wp-content>>themes>>yourthemename>>members folder>>single>>home.php and add these lines of code there

    elseif ( bp_is_user_notifications() ) :
    					locate_template( array( 'members/single/notifications.php' ), true );	
    

    just before this kinda statement // If nothing sticks, load a generic template
    next create a file named notifications.php in wp-content>>themes>>yourthemename>>members folder>>single folder and add these lines to it

    <?php
    
    /**
     * BuddyPress - Users Notifications
     *
     * @package BuddyPress
     * @subpackage bp-legacy
     */
    
    ?>
    
    <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
    	<ul>
    		<?php bp_get_options_nav(); ?>
    
    		<li id="forums-order-select" class="last filter">
    			<?php bp_notifications_sort_order_form(); ?>
    		</li>
    	</ul>
    </div>
    
    <?php
    switch ( bp_current_action() ) :
    
    	// Unread
    	case 'unread' :
    		bp_get_template_part( 'members/single/notifications/unread' );
    		break;
    
    	// Read
    	case 'read' :
    		bp_get_template_part( 'members/single/notifications/read' );
    		break;
    
    	// Any other
    	default :
    		bp_get_template_part( 'members/single/plugins' );
    		break;
    endswitch;

    and try to reload your site now your problem should be solved.
    Note: only create notifications.php if its not already there and please backup your site before making these changes

    @miama

    Participant

    I have same problem. Running BP 2.0.2 with theme Forest “Made”. Also I can not update to latest BP as I tried and all the sliders went bazuka.

    @danbp

    Participant

    hi @miama,

    deactivate the theme and all plugins except buddypress and use one of WP’s default twenty theme to test your install.

    @miama

    Participant
    
    
    <?php
    
    /**
    * BuddyPress – Users Home
    *
    * @package BuddyPress
    * @subpackage bp-default
    */
    
    //get theme options
    global $oswc_bp;
    
    //set theme options
    $oswc_bp_sidebar_unique = $oswc_bp[‘bp_sidebar_unique’];
    $oswc_bp_members_sidebar_unique = $oswc_bp[‘bp_members_sidebar_unique’];
    
    //setup variables
    $sidebar=”Default Sidebar”;
    if($oswc_bp_sidebar_unique) { $sidebar=”BuddyPress Default Sidebar”; }
    if($oswc_bp_members_sidebar_unique) { $sidebar=”BuddyPress Members Sidebar”; }
    
    get_header( ‘buddypress’ ); ?>
    
    <div class=”main-content-left”>
    
    <div class=”page-content” id=”content”>
    
    <?php do_action( ‘bp_before_member_home_content’ ); ?>
    
    <div id=”item-header” role=”complementary”>
    
    <?php locate_template( array( ‘members/single/member-header.php’ ), true ); ?>
    
    </div><!– #item-header –>
    
    <div id=”item-nav”>
    <div class=”item-list-tabs no-ajax” id=”object-nav” role=”navigation”>
    
        <?php bp_get_displayed_user_nav(); ?>
    
        <?php do_action( ‘bp_member_options_nav’ ); ?>
    
    </div>
    </div><!– #item-nav –>
    
    <div id=”item-body”>
    
    <?php do_action( ‘bp_before_member_body’ );
    
    if ( bp_is_user_activity() || !bp_current_component() ) :
    locate_template( array( ‘members/single/activity.php’ ), true );
    
    elseif ( bp_is_user_blogs() ) :
    locate_template( array( ‘members/single/blogs.php’ ), true );
    
    elseif ( bp_is_user_friends() ) :
    locate_template( array( ‘members/single/friends.php’ ), true );
    
    elseif ( bp_is_user_groups() ) :
    locate_template( array( ‘members/single/groups.php’ ), true );
    
    elseif ( bp_is_user_messages() ) :
    locate_template( array( ‘members/single/messages.php’ ), true );
    
    elseif ( bp_is_user_profile() ) :
    locate_template( array( ‘members/single/profile.php’ ), true );
    
    elseif ( bp_is_user_forums() ) :
    locate_template( array( ‘members/single/forums.php’ ), true );
    
    elseif ( bp_is_user_settings() ) :
    locate_template( array( ‘members/single/settings.php’ ), true );
    
    elseif ( bp_is_user_notifications() ) :
    locate_template( array( ‘members/single/notifications.php’ ), true );
    // If nothing sticks, load a generic template
    else :
    locate_template( array( ‘members/single/plugins.php’ ), true );
    
    endif;
    
    do_action( ‘bp_after_member_body’ ); ?>
    
    </div><!– #item-body –>
    
    <?php do_action( ‘bp_after_member_home_content’ ); ?>
    
    </div>
    
    </div>
    
    <div class=”sidebar”>
    
    <?php if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar($sidebar) ) : else : ?>
    
    <div class=”widget-wrapper”>
    
    <div class=”widget”>
    
    <div class=”section-wrapper”><div class=”section”>
    
    <?php _e(‘ Made Magazine ‘, ‘made’ ); ?>
    
    </div></div>
    
    <div class=”textwidget”>
    
    <p><?php _e( ‘This is a widget panel. To remove this text, login to your WordPress admin panel and go to Appearance >> Widgets, and drag & drop a widget into the corresponding widget panel.’, ‘made’ ); ?></p>
    
    </div>
    
    </div>
    thats what I did:
    </div>
    
    <?php endif; ?>
    
    </div>
    
    <br class=”clearer” />
    
    <?php get_footer( ‘buddypress’ ); ?>
    

    @miama

    Participant

    and this:

    <?php
    
    /**
    * BuddyPress – Users Notifications
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */
    
    ?>
    
    <div class=”item-list-tabs no-ajax” id=”subnav” role=”navigation”>
    
        <?php bp_get_options_nav(); ?>
    
        <li id=”forums-order-select” class=”last filter”>
        <?php bp_notifications_sort_order_form(); ?>
    
    </div>
    
    <?php
    switch ( bp_current_action() ) :
    
    // Unread
    case ‘unread’ :
    bp_get_template_part( ‘members/single/notifications/unread’ );
    break;
    
    // Read
    case ‘read’ :
    bp_get_template_part( ‘members/single/notifications/read’ );
    break;
    
    // Any other
    default :
    bp_get_template_part( ‘members/single/plugins’ );
    break;
    endswitch;

    @miama

    Participant

    and old same

    @miama

    Participant

    ok, I did try and it was all fine with all plugins off and twenty theme on

    @hnla

    Participant

    @miama Please don’t just post bits of code like this without explanation of why you think they are relevant to the issue, you were asked to try a standard theme, what happened when you did?

    Have you any caching plugins running.

    Have you contacted this premium themes author for any help/support?

    Also please format code when you do post it using the code button.

    @miama

    Participant

    Hi,
    ok, I am sorry, I am kind new to this. I posted the code because of suggestion above @shivam-kumar in this topic. With Twenty theme and all plugins off everything was ok, Yes I am running Quick Cache http://www.websharks-inc.com/product/quick-cache/

    thx

    @miama

    Participant

    All plugins on with twenty theme its ok too. So it is definitively the theme where is the problem as suggested by kumar. However the change in code did not work for me.

    thx

    @shivam-kumar

    Participant

    Ok a little explanation just for clearing the confusions regarding code snippets i provided above,on digging into the theme i found that the home.php was missing the call to notifications.php template in the status theme so i added the code given in 1st code snippet i provided above to fill that gap then i came to know that there is no notifications.php file present in my wp-content>>themes>>yourthemename>>members folder>>single folder so i created one that’s what my second code snippet is doing and that resolved my issue of bar appearing two times all the best

    @shivam-kumar

    Participant

    plus if the change in the code is not working make sure your theme is having templates for read and unread as well in places which are being called in notifications.php as seen in these lines
    bp_get_template_part( 'members/single/notifications/unread' );
    bp_get_template_part( 'members/single/notifications/read' );
    Note:As you are using the cache plugin you also need to clear the cache both from your site dashboard as well as from your browser to see the changes you are making try opening an incognito window in your browser and visit your site from there and see if the code you are adding changes anything
    Thanks

    @miama

    Participant

    Hi Kumar,
    Just to THANK YOU for solving my problem with Notification.This problem is solved thx to you. I still have same problem with Listing tab which belongs to Another WP Classified plugin, I posted link to this topic there so they can look at it.

    @shivam-kumar

    Participant

    i am glad i was able to help thanks 🙂

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘[Resolved] Notification – what's wrong here?’ is closed to new replies.
Skip to toolbar