Persistant search and pagination

BP Profile Search › Persistant search and pagination

  • Author
    Post
  • #9912 Reply
    Liz
    Guest

    Hi 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

    #9914 Reply
    andrea
    Plugin Author

    Hi 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!

    #9915 Reply
    Liz
    Guest

    Hi Andrea

    Will keep persistent search turned on – thanks!

    #10257 Reply
    Nassim KHALED KHODJA
    Guest

    Hi,
    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
    Thanks

    #10259 Reply
    andrea
    Plugin Author

    Hi 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?

    #10260 Reply
    Nassim KHALED KHODJA
    Guest

    Hi,
    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)

    #10261 Reply
    andrea
    Plugin Author

    Hi Nassim,

    Version 5.2 contains the new filter, please give it a try!

Reply to: Persistant search and pagination
My Information