Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#322 closed defect (bug) (fixed)

Members widget sort call ignores Max to show feature

Reported by: mikepratt Owned by:
Milestone: Priority: minor
Severity: Version:
Component: Keywords: widget, member
Cc: michael@…, mike@…

Description

When you click on either Newest/Active/Popular on the members widget the list is properly sorted but the widget shows the # of members that would be shown if the max show feature was left blank in the control...ie the list grows. I had 5 max as an option and 10 would show if I sorted

Change History (8)

#1 follow-up: @fishbowl81
13 years ago

  • Milestone set to Core 1.1

Real simple,

The widget php, has a hidden field:

<input type="hidden" name="bp_core_widget_members_max" id="bp_core_widget_members_max" value="<?php echo $optionsmax_members? ?>" />

but the ajax is looking for:

$_POSTmax-members?

if we change the file, bp-core-ajax.php, lines: 10, 13, 16

from:

case 'newest-members':

$users = BP_Core_User::get_newest_users( $_POSTmax-members?, 1 );

break;
case 'recently-active-members':

$users = BP_Core_User::get_active_users( $_POSTmax-members?, 1 );

break;
case 'popular-members':

$users = BP_Core_User::get_popular_users( $_POSTmax-members?, 1 );

break;

to:

case 'newest-members':

$users = BP_Core_User::get_newest_users( $_POSTbp_core_widget_members_max?, 1 );

break;
case 'recently-active-members':

$users = BP_Core_User::get_active_users( $_POSTbp_core_widget_members_max?, 1 );

break;
case 'popular-members':

$users = BP_Core_User::get_popular_users( $_POSTbp_core_widget_members_max?, 1 );

break;

#2 in reply to: ↑ 1 @fishbowl81
13 years ago

Replying to fishbowl81:

Nevermind, missed the boat on this one.

let me try again, sorry.

#3 @fishbowl81
12 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Found possible cause of the problem.

There are 2 widgets which use this ID:

bp_core_widget_members_max

the member widget, and the number of members online. If you have who's online widget enabled, and don't have a max set, then the ajax will pass "" as the maximum number of members, assuming you have the who's online widget loading prior to the members widget.

If you set a maxmembers for both your who's online and members widget, then it works.

#4 @apeatling
12 years ago

  • Milestone changed from Core 1.1 to Core 1.0
  • Resolution invalid deleted
  • Status changed from closed to reopened

#5 @mikepratt
12 years ago

  • Cc michael@… added

#6 @mikepratt
12 years ago

  • Cc mike@… added

#7 @apeatling
12 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in trunk.

#8 @(none)
12 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.