Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#6496 closed defect (bug) (no action required)

BP_User_Query may return wrong total if WP_User query was filtered

Reported by: tanner m Owned by:
Priority: normal Milestone:
Component: Members Version:
Severity: normal Keywords: has-patch needs-unit-tests needs-testing
Cc:

Description

I am working on a site that is using the bp-profile-visibility plugin which filters the WP_User_Query to hide profiles. Since the BP_User_Query class does not sync with the WP_User_Query totals if it already has a total, the actual total count from the WP_User_Query query can very from the initial count from BP_User_Query.

I am attaching a patch that will update the BP_User_Query total with the actual results count from the WP_User_Query.

Attachments (1)

update_total.diff​ (796 bytes ) - added by tanner m 11 years ago.

Download all attachments as: .zip

Change History (5)

#1 @boonebgorges
11 years ago

  • Keywords has-patch needs-unit-tests needs-testing added
  • Milestone Awaiting Review → 2.4

Thanks for the patch, tanner. This needs cross-referencing against [7660], to make sure we don't reintroduce #5271. If there's a way to write unit tests that demonstrate this fix and that one, it'd make it easier :)

#2 @tanner m
11 years ago

Thanks Boone! I'll check that out and see if I can put a unit test together.

This ticket was mentioned in ​Slack in #buddypress by tanner. ​View the logs.


11 years ago

#4 @tanner m
11 years ago

  • Milestone 2.4
  • Resolution → invalid
  • Status new → closed

Turns out this was a plugin issue. Closing.

Note: See TracTickets for help on using tickets.