[buddypress-trac] [BuddyPress Trac] #6189: Query string in directory URL breaks AJAX pagination

buddypress-trac noreply at wordpress.org
Sat Feb 21 13:44:12 UTC 2015

#6189: Query string in directory URL breaks AJAX pagination
 Reporter:  dontdream            |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  Component - Members  |     Version:
 Severity:  normal               |  Resolution:
 Keywords:                       |

Comment (by dontdream):

 I've tested again with WP 4.1.1 and BP 2.2.1. There are minor differences,
 but the main issue remains.

 1. Visit the Members Directory page with the URL:

 2. Check the pagination links, they are like


 3. Click one of the pagination links; the correct page is Ajax loaded

 4. Check the new pagination links, they are like


 If you click one of the new pagination links, an incorrect page is Ajax

 That happens because, when generating the pagination links, the
 BP_Core_Members_Template class constructor uses an empty string as $base
 if the page is not being Ajax loaded, but uses the referrer URL as $base
 if the page is being Ajax loaded.

 This difference in setting the $base value is not necessary and, when the
 URL contains a query string, it's harmful.

 The updated patch removes the unneeded code in the Members, Groups and
 Messages directories.

 PS: I guess that the code I'm suggesting to remove was meant to preserve
 the whole original query string in the pagination links. If that was the
 idea, probably it has never worked, because the template JavaScript
 expects the 'upage' variable to be the first in the query string.

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

More information about the buddypress-trac mailing list