[buddypress-trac] [BuddyPress] #3653: Clicking on "All Members" tab not working after a search.
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Mon Oct 10 19:28:05 UTC 2011
#3653: Clicking on "All Members" tab not working after a search.
-------------------------------------+-----------------------------
Reporter: gingram815 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Members | Version: 1.5
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion |
-------------------------------------+-----------------------------
Changes (by boonebgorges):
* keywords: => needs-patch 2nd-opinion
* version: => 1.5
* milestone: Awaiting Review => Future Release
Comment:
Confirmed. The issue is this.
- Clicking 'All Members' launches an AJAX request handled by
bp_dtheme_object_template_loader()
- That function loads members/members-loop.php
- That template does a bp_has_members() loop using bp_ajax_querystring()
- In bp_has_members() we check the $_REQUEST global for search terms 's',
and filter based on it
There seem to be at least two problems here.
(1) We (probably) shouldn't be looking at URL arguments out of $_GET when
dealing with AJAX requests
(2) We (probably) shouldn't be filtering based on $_REQUEST['s'] in such a
forced way in bp_has_members()
Problem (2) is a more general issue. IMO whatever else we do, we should
move this logic http://buddypress.trac.wordpress.org/browser/tags/1.5/bp-
members/bp-members-template.php#L309 *above* the parsing of
default/function args. That way, it'll be possible to turn off the
search_terms even when there's something hanging around in $_REQUEST.
That, by itself, probably won't fix the problem here, since the template
will still default to $_GET['s'] in its query. Perhaps we want to make an
exception in bp_dtheme_ajax_querystring() to the effect that, when
DOING_AJAX, pass a null value for search_terms? Would like to hear
feedback from others.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3653#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list