On the http://drupal.org/profile "Member Directory" tab there is some odd behavior on popular sites. Users are sorted by most recent access which is very volatile resulting in the same user being shown on multiple pages.

For example from one specific instance:

page 1 I get bojanz
page 3 I get bojanz
page 4 I get bojanz
back to page 1 no bojanz but i'm there :)

Just paging through you can see the names reappearing on subsequent pages.

Instead it could use login time or maybe an average of login and access to get a bit more stability.

CommentFileSizeAuthor
#1 989786-profile-sort.patch509 bytesmr.baileys

Comments

mr.baileys’s picture

Title: Member Directory tab results sorting bug » Sort criteria used for profile.module is too volatile
Project: Drupal.org site moderators » Drupal core
Version: » 7.x-dev
Component: Site organization » profile.module
Assigned: Unassigned » mr.baileys
Status: Active » Needs review
StatusFileSize
new509 bytes

This is a core bug.

The profile module currently sorts the profiles listed on /profile on the {users}.access field. As indicated by the bug report above, this field is way too volatile to use as sorting criteria for a paged list on sites with a larger user-base such as drupal.org.

I guess that we do want a user's activity to remain a factor in ordering the profiles, so attached is a patch that sorts on {users}.login instead of {users}.access (granted, people who are very active on a site and rarely log in because their session remains active are negatively affected by this).

mr.baileys’s picture

Title: Sort criteria used for profile.module is too volatile » Sort criteria used for /profile list is too volatile

Better title.

mr.baileys’s picture

Assigned: mr.baileys » Unassigned
rszrama’s picture

Honestly, if all we show is bojanz, I consider that a feature, not a bug.

bojanz’s picture

Well, this made me laugh, two and a half years later :)

greggles’s picture

Issue summary: View changes

x

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.