[buddypress-trac] [BuddyPress Trac] #8269: Member Directory nav tab Won’t Display over 999 member count

buddypress-trac noreply at wordpress.org
Sun Apr 5 02:11:39 UTC 2020


#8269: Member Directory nav tab Won’t Display over 999 member count
--------------------------+-----------------------------
 Reporter:  twmcmahan     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Templates     |    Version:  5.0.0
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 We have 3,078 Members.  When opening the member directory the pagination
 count(s) is correct, but the count in the tab navigation is 3.

 I’ve resolved this by making a change to the function
 bp_nouveau_get_nav_count()

 /bp-templates/bp-nouveau/includes/template.tags.php Line 1266
 From:
 {{{#!php
 <?php
 $count = (int) $nav_item->count;
 }}}

 to
 {{{#!php
 <?php
 $count = (int) str_replace(',', '', $nav_item->count );
 }}}


 It appears that $nav_item->count returns 3,078 and because it’s being
 forced to an integer it’s only returning 3 as the code is written.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8269>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list