• Resolved rocke

    (@shashibhushan)


    Getting Below warring message.. i cant add post and cant see also …

    Warning: Division by zero in /wp-content/plugins/buddypress/bp-activity/bp-activity-template.php on line 783

    Line No 783 : is

    if ( ! empty( $activities_template->pag_page ) ) {
    		$remaining_pages = floor( ( $activities_template->total_activity_count - 1 ) / ( $activities_template->pag_num * $activities_template->pag_page ) );
    	}

    Full function of above :

    /**
     * Return true when there are more activity items to be shown than currently appear.
     *
     * @since BuddyPress (1.5)
     *
     * @global object $activities_template {@link BP_Activity_Template}
     * @uses apply_filters() To call the 'bp_activity_has_more_items' hook.
     *
     * @return bool $has_more_items True if more items, false if not.
     */
    function bp_activity_has_more_items() {
    	global $activities_template;
    
    	$remaining_pages = 0;
    
    	if ( ! empty( $activities_template->pag_page ) ) {
    		$remaining_pages = floor( ( $activities_template->total_activity_count - 1 ) / ( $activities_template->pag_num * $activities_template->pag_page ) );
    	}
    
    	$has_more_items  = (int) $remaining_pages ? true : false;
    
    	return apply_filters( 'bp_activity_has_more_items', $has_more_items );
    }

    I cant add / see my Post … there is Load More link but when click it nothing happen .

    domain.com/dashboard and domain.com/member/username

    above both page does not works

    below are the version i am using
    Its not working on both pages thats ..

    WordPress : 3.9.1
    BuddyPress : Version 2.0.1
    BuddyPress Activity Comment Notifier : Version 1.0.8
    BuddyPress Activity Plus : Version 1.6
    BuddyPress Friends Only Activity Stream : Version 1.0

    pls help me

    https://www.ads-software.com/plugins/buddypress-activity-plus/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter rocke

    (@shashibhushan)

    In short i cant see my all activity @

    domain.com/members/username/activity/196/

    nothing is seen in above link

    where as active 2 minutes ago dsdsds View

    i can see here my update….

    Thread Starter rocke

    (@shashibhushan)

    Ok so what i noted now is … when i am login With Admin account then i can see and post activity ….

    But as a new user register ( Subscriber ) on website ..then he cant add nor see his activity ( post ) … but his activity can be added and seen by admin of website

    Thread Starter rocke

    (@shashibhushan)

    any plugin admin here ? ..pls help me

    Thread Starter rocke

    (@shashibhushan)

    hey i short out the error message what i did is replace above function with below one :

    function bp_activity_has_more_items() {
    	global $activities_template;
    
    	$remaining_pages = 0;
    
     if ( ! empty( $activities_template->pag_page ) ) {
            if( ($activities_template->pag_num * $activities_template->pag_page) == 0 ) {
                $remaining_pages = 0;
            } else {
    		$remaining_pages = floor( ( $activities_template->total_activity_count - 1 ) / ( $activities_template->pag_num * $activities_template->pag_page ) );
            }
        }
    
    	$has_more_items  = (int) $remaining_pages ? true : false;
    
    	return apply_filters( 'bp_activity_has_more_items', $has_more_items );
    }

    but activity post list of resp. user are not seen … only admin can see all activity properly … pls help me

    Thread Starter rocke

    (@shashibhushan)

    solved my self :

    its was because of BuddyPress Friends Only Activity Stream : Version 1.0 PLUGIN

    Plugin Support Predrag – WPMU DEV Support

    (@wpmudev-support1)

    Awesome, great to see you got that solved.

    If I can be of any further assistance please don’t hesitate to ask ??

    Cheers,
    WPMU DEV

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cant add / see post getting Warning: Division by zero’ is closed to new replies.