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

buddypress-trac noreply at wordpress.org
Sun Feb 22 01:43:46 UTC 2015


#6189: Query string in directory URL breaks AJAX pagination
-----------------------------------+------------------
 Reporter:  dontdream              |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  2.3
Component:  Component - Members    |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => has-patch 2nd-opinion
 * milestone:  Awaiting Review => 2.3


Comment:

 Thanks for following up and for the patch, dontdream.

 The DOING_AJAX stuff was added in [8931] #5768. In a nutshell, there are
 certain query args that we need to blacklist from being added to the
 pagination links - in that particular case, it was 's'. The whole thing is
 kind of a mess, to be honest, and I'm not 100% certain of the best way
 forward. [attachment:6189.diff] is one attempt: when doing AJAX, parse the
 query string, unset the 's' key, and pass all other query vars as
 'add_args' to `paginate_links()`. It works, but it is quite homely. I'd
 like to ask @r-a-y to chime in here, as he's been knee-deep in this
 particular mud before.

 > 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.

 Oh boy. I had never seen it before, but I'm assuming you're talking about
 this gem: https://buddypress.trac.wordpress.org/browser/tags/2.2.0/src/bp-
 templates/bp-legacy/js/buddypress.js#L940 I think we can probably do
 better than this :) But probably a subject for a separate ticket.

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


More information about the buddypress-trac mailing list