mlaa / cbox-mla

GNU General Public License v2.0
2 stars 3 forks source link

discrepancy between member counts in member directory #267

Closed JonathanReeve closed 8 years ago

JonathanReeve commented 9 years ago

The member count on the top of the page, in the "All Members" tab, now reads "5,000," while the count at the bottom of the page reads "Viewing 1-20 of 5,002 members."

The database query for bp_core_get_active_member_count() is SELECT COUNT(user_id) FROM wp_bp_activity WHERE component = 'members' AND type = 'last_activity';, which returns 5,002.

Two possibilities:

  1. The comments in bp_total_member_count() say that this function has been calculated two different ways pre- and post-version 1.6. If our template is based on the pre-1.6 version, then we could be calculating member counts in two different ways.
  2. The get_transient() and set_transient() functions cache this value in different places because they have different transient names and/or expiration times.
JonathanReeve commented 9 years ago

Looks like this has mostly fixed itself. I think one of these counts uses total members, and the other uses active members. This is not ideal, but a low-priority problem. Removing bugfix milestone and moving to wishlist.