Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 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's profile tanner m Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Members 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 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @boonebgorges
9 years ago

  • Keywords has-patch needs-unit-tests needs-testing added
  • Milestone changed from Awaiting Review to 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
9 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.


9 years ago

#4 @tanner m
9 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Turns out this was a plugin issue. Closing.

Note: See TracTickets for help on using tickets.