[buddypress-trac] [BuddyPress] #3406: Group Member ajax pagination broken

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Jul 28 22:30:35 UTC 2011


#3406: Group Member ajax pagination broken
--------------------------------------------------+------------------
 Reporter:  johnjamesjacoby                       |       Owner:
     Type:  defect                                |      Status:  new
 Priority:  normal                                |   Milestone:  1.3
Component:  Groups                                |     Version:
 Severity:  normal                                |  Resolution:
 Keywords:  needs-patch dev-feedback 2nd-opinion  |
--------------------------------------------------+------------------
Changes (by boonebgorges):

 * keywords:  needs-patch => needs-patch dev-feedback 2nd-opinion


Comment:

 Ajax pagination on these sorts of list is a mess. For this reason, I
 suggest that we turn off ajax on group members pagination lists. (Not sure
 how it got turned on, actually.)

 Here's why it doesn't work. When you click a pagination link, our JS looks
 to see if you are on a highlighted nav tab, as a shortcut way of figuring
 out which kind of content it should load. In the case of group
 memberships, the id of the tab is "members-personal-li". The JS then
 splits this id in order to get the params for the AJAX request
 https://buddypress.trac.wordpress.org/browser/trunk/bp-themes/bp-
 default/_inc/global.js#L566; the first part of the split, "members", is
 then used to determine a template file that should be loaded to get the
 ajax response value https://buddypress.trac.wordpress.org/browser/trunk
 /bp-themes/bp-default/_inc/ajax.php#L84. The problem is that members
 /members-loop.php does a bp_has_members() query, not
 bp_group_has_members(), and as a result an invalid response is returned.

 To work our way around this, we'd need to either rewrite the entire way
 that pagination ajax works, or create a special case for groups members
 pages, or at the very least split the loop portion of
 groups/single/members.php into its own file, so that it could be requested
 on the ajax request (which would take some finagling, but would be
 possible). IMO, all three options are far too much work.

 So, once again, I opt that we add the 'no-ajax' class to the pagination
 block for this version of BP. We can consider refactoring the pagination
 ajax to be less convoluted sometime in the future.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3406#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list