[buddypress-trac] [BuddyPress Trac] #7093: Group Members search broken on non-ajax sites as it's providing 'members_search' on $_REQUEST but system looks for 's'

buddypress-trac noreply at wordpress.org
Thu May 26 21:35:41 UTC 2016


#7093: Group Members search broken on non-ajax sites as it's providing
'members_search' on $_REQUEST but system looks for 's'
---------------------------------+-----------------------------
 Reporter:  garrett-eclipse      |      Owner:
     Type:  defect (bug)         |     Status:  new
 Priority:  normal               |  Milestone:  Awaiting Review
Component:  Component - Members  |    Version:  2.5.0
 Severity:  normal               |   Keywords:
---------------------------------+-----------------------------
 Hello,

 Updating my Buddypress to the latest and going through the updating
 templates I found that the latest Buddypress breaks the Members Search if
 ajax is disabled or viewing on non-js.

 The search form in bp_directory_members_search_form() was updated to
 submit the search query via $_REQUEST['members_search'] rather than the
 previous $_REQUEST['s']. But the bp_group_has_members function is still
 expecting the old $_REQUEST['s'] so searches don't turn up any results
 instead they just list all users as though no search was done.

 The following code will need to be updated to us the new request term
 'members_search';
 {{{#!php
 <?php
         if ( is_null( $r['search_terms'] ) && ! empty( $_REQUEST['s'] ) )
 {
                 $r['search_terms'] = $_REQUEST['s'];
         }
 }}}
 Reference:
 https://github.com/buddypress/BuddyPress/blob/843da8eef10c12884c9a94186eec32743cb038e3/src
 /bp-groups/bp-groups-template.php#L3638

 There may be other instances where it's looking for 's' instead of
 'members_search' as the search request.

 This isn't evident on a clean install as ajax is enabled and the script
 intercepts the search and handles the lookup via ajax rather than form
 submission and the bp_group_has_members method.

 Thank you

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7093>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list