BP Profile Search › Persistant search and pagination
-
AuthorPost
-
Liz
GuestHi thought I’d let you know about a weird bug we found.
With Persistent Search turned OFF, when searching using the form, pagination breaks after the first page, returning all members.So, page one returns the correct filtered results, page 2 etc. just return all results without the search filter.
We’re using the bps-form-default.php template as we added in some extra html around the form.
Running WP 5.2, BP 4.3, BP Profile Search 5.0.3
andrea
Plugin AuthorHi Liz,
Thank you for your report!
In some settings it happens that, with Persistent Search disabled, the search stops working after the first page, and usually that issue is difficult to debug.
So I suggest you enable Persistent Search, unless you really need to keep it disabled. In the latter case, I need to have a look at your site to understand what the problem is.
Please let me know your decision!
Liz
GuestHi Andrea
Will keep persistent search turned on – thanks!
Nassim KHALED KHODJA
GuestHi,
I have same bug. After search, i found the conflit. BP SEARCH PROFIL remove the parameters that are not part of the form of “BP PROFIL SEARCH”
See: bps-search.php, funtion bps_clean_request ()
One of the solutions is change the function bps_allowed_keys to add filter.
change ligne 67 <return $keys> with <return apply_filters (‘bps_allowed_keys’,$keys);>
After, it easy add parameters of the navigation
Thanksandrea
Plugin AuthorHi Nassim,
Thank you for your suggestion, I’ll add the filter in the next plugin release.
By the way, which keys would you like to add to the allowed list?
Nassim KHALED KHODJA
GuestHi,
I add ‘upage’ because it’s the default key for buddypress when we use “bp_members_pagination_links ()” (see buddypress / members / bp-members-template.php)andrea
Plugin AuthorHi Nassim,
Version 5.2 contains the new filter, please give it a try!
-
AuthorPost