Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem after update -> Members Widget

  • @allenpayne

    Participant

    Hi,

    I just updated to wp 3.5.1 and buddypress 1.7 and i have an unusual problem with the Members widget.

    I currently have 3k+ members on my site and my top member has 400+ friends.

    When i add the Members widget to the sidebar and click on Popular…it shows a list of member starting with the member with 96 friends.

    For some reason it doesn’t show the top members (starting with the one with 400+ friends).

    Any ideas?

    ***
    I tried to replace the bp-core-widgets.php file with the one from the previous version, but it didn’t work.

Viewing 11 replies - 1 through 11 (of 11 total)
  • @modemlooper

    Moderator

    It’s most likely the same code in both versions. If it’s true it’s a bug but you could always create your own widgets.

    @allenpayne

    Participant

    @modemlooper i dont think the widget is the issue here. for some reason buddypress 1.7 doesn’t see all my members. it worked fine with 1.6.

    the other functions of the Members widget (recently active, newest registered) work fine. only the Most Popular function doesn’t work as it should.

    also when i go to the profile of the top member, everything shows up fine (it says it has 406 friends).

    i have no idea what else to do.

    can anyone help?

    @modemlooper

    Moderator

    your members directory list doesnt show all members?

    @allenpayne

    Participant

    the members directory list shows all members (3k+). other than the bp-core-widgets.php file, what file should i replace with the one from the previous version?

    thanks

    @allenpayne

    Participant

    @modemlooper, this is not a theme issue either. i tried changing themes but this problem still persists.

    @allenpayne

    Participant

    I found the file that’s causing this. It’s this one:

    /buddypress/bp-members/bp-members-functions.php

    If i replace it with the one from previous version the widget works fine. but instead of replacing it, does anyone have a fix for this?

    I’m afraid if i change it, BP won’t use the new query to return the users list anymore.

    Feel free to correct me if i’m wrong.

    thanks

    @allenpayne

    Participant

    After more testing, i found the part of the code that’s causing this. I placed it into a pastebin file. Please take a look:

    http://pastebin.com/1gWY3GNV

    Can you tell me what is the problem with the code from bp 1.7?

    @allenpayne

    Participant

    well, i changed this:

    if ( apply_filters( ‘bp_use_legacy_user_query’, false, __FUNCTION__, $params ) ) {

    to this:

    if ( apply_filters( ‘bp_use_legacy_user_query’, true, __FUNCTION__, $params ) ) {

    and now it works.

    Is this a good solution?

    @allenpayne

    Participant

    I submitted a trac ticket for this issue. Until this is resolved, here’s a temporary solution for anyone else who is having this problem:

    add_filter( ‘bp_use_legacy_user_query’, ‘__return_true’ )

    Place this filter in your functions.php file.

    @shanebp

    Moderator

    edit: I see you’ve posted a trac ticket – thanks.

    @hnla

    Participant

    Adding link to ticket for convenience:
    https://buddypress.trac.wordpress.org/ticket/4937

    Also the temp fix is probably better placed in bp-custom.php rather than functions.php so it is applicable to BP generically rather than by theme activated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem after update -> Members Widget’ is closed to new replies.
Skip to toolbar