[buddypress-trac] [BuddyPress Trac] #5584: Pagination is removed when all groups are empty

buddypress-trac noreply at wordpress.org
Mon Dec 8 17:09:30 UTC 2014

#5584: Pagination is removed when all groups are empty
 Reporter:  dansearle                     |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  2.2
Component:  Groups                        |     Version:  2.0
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |

Comment (by boonebgorges):

 > Got weird behaviour here, if I specify $user_id as creator_id in group
 factory tests are failing, otherwise tests are passed.

 Your `get_current_user_id()` check is returning 0. So
 `BP_UnitTest_Factory_For_Group` is creating a user behind the scenes. That
 means that your group member deletions are doing nothing.

 I've updated the patch so that it fails as expected. The proper fix will
 be to change the group count query so that it doesn't join the
 group_members table like this, but first I'd like a bit of research done
 into why this join was put there in the first place. ("Peatling did it"
 may end up being a sufficient answer.)

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5584#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list