[buddypress-trac] [BuddyPress Trac] #9268: Unexpected behaviour with Friends List default sorting

buddypress-trac noreply at wordpress.org
Sun Feb 9 15:59:03 UTC 2025


#9268: Unexpected behaviour with Friends List default sorting
-------------------------------------+------------------------------
 Reporter:  yatesa01                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  (not sure)               |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------
Changes (by pratiklondhe):

 * keywords:   => has-patch needs-testing


Comment:

 More details found after debugging:

    - The issue appears to be with session storage keys. While the selected
 filter information is stored under the `bp-friends` key, the AJAX call
 accesses `bp-members`, causing incorrect data to be sent despite the
 correct filter being displayed.
   -   After further investigation, it seems the object variable passed to
 the AJAX function is set to "members". When the filter is updated, the
 `bp-friends` storage key gets updated, but `bp-members` remains unchanged.
 This suggests an issue with how these keys are being set.
  -  Since I don’t have a complete understanding of this, I am submitting a
 patch to update the `bp-members` keys. The root cause seems to be a
 mismatch between `data-bp-components` and `data-bp-list` — `data-bp-
 components` is set to "friends", but JavaScript reads it as "members" due
 to `data-bp-list being` "members". Updating `data-bp-list` to "friends"
 appears to fix the issue.
 ( attaching a video of the issue fixed )
 P.S. This is my first contribution to BuddyPress, so the above analysis
 might not be entirely accurate. I'm open to suggestions and feedback to
 improve the fix if there's a better approach.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9268#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list