Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP 2.4 breaks on page 2 of custom search results

  • @kennibc

    Participant

    I have a video of the issue:
    https://www.youtube.com/watch?v=mV-FFRqmVZs

    This issue deals with pagination when you do a search of a custom buddypress profile field. The initial pagination page properly displays 1-X amount of users. Click on page 2 and it shows all users in the site not just the custom searched users.

    Any suggestions? Is this related to my theme or plugins?

Viewing 14 replies - 1 through 14 (of 14 total)
  • @kennibc

    Participant

    I should point out this is BP 2.4 with WP 4.3. It is multisite with sub directory install.

    @r-a-y

    Keymaster

    What are your URLs linking to? In your video you mentioned something like /members/?s=whatever?

    In BuddyPress 2.4.0, you have to change the s parameter to members_s. In 2.4.1, this will change to members_search due to a typo.

    How are you setting up the members loop to filter students by school?

    @kennibc

    Participant

    Here is the main page: http://iblog.dearbornschools.org/teachers-by-school/
    Any of these school links will open a url similar to the one below.

    The search filter URL is http://iblog.dearbornschools.org/members/?s=Woodworth

    where woodworth is the school they pick in their user profile.

    @r-a-y

    Keymaster

    My suggestion of changing s to members_s should work.

    Give it a shot. Remember to change this to members_search in v2.4.1.

    @kennibc

    Participant

    Wow. Thank you. This seems to work until the very last page of the search pagination.
    Instead of showing the last few people it breaks and shows all the users from the search.

    http://iblog.dearbornschools.org/teachers-by-school/ click on woodworth and go to page three to see what I mean.

    Still, this is much better!

    Thank you kindly @r-a-y

    @r-a-y

    Keymaster

    Thanks for getting back to me.

    I can confirm that the pagination handling is a bug. Looking into it and will post a reply once I’ve established a fix.

    @kennibc

    Participant

    Excellent. Glad to find an issue. Hope the fix isn’t difficult.

    Thank you so much for your speedy response.

    Ps. I am really liking the profile cover photo. Hats off to the devs for such great work.

    @r-a-y

    Keymaster

    I’ve got a fix ready:
    https://buddypress.trac.wordpress.org/attachment/ticket/6745/6745.01.patch

    Apply the lines in that patch to your BuddyPress install.

    To test this, you’ll need to set WP_DEBUG to true so it will load the unminified version of the javascript:
    https://codex.wordpress.org/WP_DEBUG

    Let me know if this fixes the problem.

    @kennibc

    Participant

    I will have to check on Monday. We are closing up for the weekend.

    Also, I have never done a patch, so I might not be the best candidate to test. Do I just manually edit the files?

    @r-a-y

    Keymaster

    Yes, you just manually edit the files.

    If you need help with this, I can provide the patched files somewhere where you can just copy and paste.

    @kennibc

    Participant

    r-a-y,
    I saw in the recent BP update this issue was addressed but I am still getting the issue. Am I missing something? As soon as I go to page two the custom search breaks for members.

    Teachers by School

    @r-a-y

    Keymaster

    See my note here:
    https://buddypress.org/support/topic/bp-2-4-breaks-on-page-2-of-custom-search-results/#post-247017

    You have to rename the parameter to members_search for BP 2.4.2 in your custom page content.

    @kennibc

    Participant

    Thanks. That indeed did the trick. However, if I view an individual profile and click on the profile field it shows a page with others who have the same profile term and uses the wrong format again. That is baked into the buddypress profile page. I cannot change that.

    see this page and click on the school building tag in the profile: http://iblog.dearbornschools.org/members/kieselh/profile/

    Then try the pagination. It’s broke because it uses ?s_= and that is generated by Buddypress for the custom profile.

    @r-a-y

    Keymaster

    Thanks for noticing this, kennibc.

    I’ve attached a fix for this here:
    https://buddypress.trac.wordpress.org/attachment/ticket/6770/6770.01.patch

    The change you’ll be interested in is located in the /bp-xprofile/bp-xprofile-filters.php file.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘BP 2.4 breaks on page 2 of custom search results’ is closed to new replies.
Skip to toolbar