Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 4 years ago

#8076 closed defect (bug) (fixed)

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

Reported by: lordofdoom's profile 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 (3)

#1 @lordofdoom
6 years ago

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

#2 @lordofdoom
6 years ago

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

#3 @imath
4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi thanks for your report. This was fixed in #8269.

Note: See TracTickets for help on using tickets.