Problem after update -> Members Widget
-
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.
-
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.
@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?
your members directory list doesnt show all members?
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
@modemlooper, this is not a theme issue either. i tried changing themes but this problem still persists.
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
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:
Can you tell me what is the problem with the code from bp 1.7?
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?
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.
edit: I see you’ve posted a trac ticket – thanks.
Adding link to ticket for convenience:
https://buddypress.trac.wordpress.org/ticket/4937Also 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.
- The topic ‘Problem after update -> Members Widget’ is closed to new replies.