Skip to:
Content

BuddyPress.org

Opened 17 months ago

Last modified 17 months ago

#8076 new defect (bug)

Bug in user count -> E.g. on Members Page

Reported by: lordofdoom Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Templates Keywords:
Cc:

Description

There is a bug in buddypress/bp-templates/bp-nouveau/includes/template-tags.php

$nav_item->count return a string, but if a site have more than 1k users this string will be 1,000 -> So the integer will be 1

Line 1247 need to get changed from:

<?php
                if ( 'directory' === $bp_nouveau->displayed_nav ) {
                        $count = (int) $nav_item->count;

to e.g.:

<?php
                if ( 'directory' === $bp_nouveau->displayed_nav ) {
                        $count = intval(str_replace(",","",$nav_item->count));

Thank you :-)

Change History (2)

#1 @lordofdoom
17 months ago

  • Summary changed from Bug in user count -> to Bug in user count -> E.g. on Members Page

#2 @lordofdoom
17 months ago

Another option (better) is not to return a string at all for a count function :-)

Note: See TracTickets for help on using tickets.