[buddypress-trac] [BuddyPress Trac] #8633: Pagination broken in `BP_Blogs_Blog::get()`

buddypress-trac noreply at wordpress.org
Wed Feb 2 23:53:54 UTC 2022

#8633: Pagination broken in `BP_Blogs_Blog::get()`
 Reporter:  r-a-y         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  10.1.0
Component:  Blogs         |    Version:  10.0.0
 Severity:  major         |   Keywords:  has-patch
 In #8488, date queries were added for the blogs component. Also some
 refactoring was done to the blogs stack so we could pass an array instead
 of multiple function arguments.

 There is a bug during the refactoring that broke pagination when fetching
 the blogs loop (apologies!). For large sites, this can cause timeouts on
 the Sites Directory.

 In `BP_Blogs_Blog::get()`, the "per page" argument was previously
 `$limit`, while in `bp_blogs_get_blogs()`, the "per page" argument is
 `$r['per_page']`. When swapping to the function array, `$r['limit']`
 doesn't exist, which caused no pagination 😅

 I've attached a patch, which fixes this issue.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8633>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list