#4931 closed defect (bug) (fixed)
Add Friend - Cancel Friendship Request buttons behave inconsistently
Reported by: | dontdream | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.7.1 | Priority: | normal |
Severity: | minor | Version: | 1.7 |
Component: | Templates | Keywords: | commit |
Cc: |
Description
Go to the Members directory and using the pagination links go, say, to page 2. If you click one of the 'Add Friend' buttons, the page reverts to page 1. Go to page 2 again, and the clicked 'Add Friend' button has correctly changed to 'Cancel Friendship Request'. If you click it now, that takes you to the page "domain.com/members/admin/friends/requests/" where it correctly says "Friendship request withdrawn".
The expected behavior would be a simple fade in / fade out of the 'Add Friend' and 'Cancel Friendship Request' buttons when you click them, as BP 1.6.4 does.
Attachments (1)
Change History (10)
#2
@
12 years ago
- Keywords reporter-feedback removed
My setup is a clean WP 3.5.1 installation with BP 1.7 only. I did import a few users for testing, and they are all marked 'Never active', so to see them you have to select Order By: Alphabetical.
I didn't see any JS errors, but you are welcome to have a look at http://anantir.com/clean17/, user: tester, pass: test
#3
@
12 years ago
- Milestone changed from Awaiting Review to 1.7.1
- Owner set to boonebgorges
- Severity changed from normal to minor
- Status changed from new to assigned
- Type changed from enhancement to defect (bug)
Thanks. I've confirmed the issue. The problem is the pagination: because pages beyond #1 are loaded via AJAX, we need to use event delegation to bind the click event to the .friendship-button elements. See also #4458.
The change is a result of r6635, which moved us from jQuery.live() to jQuery.on(). That migration was done incorrectly in this case (and, I'd wager, in the case of group directories as well).
Because this is a regression from 1.6.x, I'm tentatively putting it in the 1.7.1 milestone. I can write a patch later; it should be straightforward. If any devs object to making significant JS changes in a maintenance release, I suppose we can move it to 1.8.
#4
@
12 years ago
- Keywords has-patch added
See 4831.patch for proposed fix. If there are no objections, I'll apply it to 1.7.x as well as trunk.
Can you give more details about your setup? What theme are you using, and what other BP plugins?
Would you mind opening a JS console in your browser, to see if there are any errors in the AJAX request? Or maybe you'll find that the AJAX request isn't firing at all?