Bug #1257
closedNext Page Navigation missing at bottom of page when looking at Group Members
0%
Description
When I go to a group that has more than a page of members, and I click on the Members tab, I am presented with a list of the group's members. When I scroll down to the bottom of the page, I do not see the navigation that allows me to go to the next page of members. Instead, I have to scroll all the was to the top and use the navigation there to view the next page. This is inconsistent with how we display group, member, blogs on other tabs and may lead some to feel they're seeing the complete list of members in a group, while in fact they are just seeing the first page.
Files
Updated by Boone Gorges almost 13 years ago
- Status changed from New to Assigned
- Assignee set to Boone Gorges
- Priority name changed from Normal to Low
- Target version set to 1.4
Updated by Boone Gorges almost 13 years ago
- Assignee changed from Boone Gorges to Dominic Giglio
Dom, can you add this? Should just be able to copy from the top of the template.
Updated by Dominic Giglio over 12 years ago
Boone, I don't think I understand this issue. I'm trying to recreate the problem but everything looks OK.
Check out this group: http://commons.gc.cuny.edu/groups/oapn/
Click on Members in the sidebar on the right and you'll get the list of 95 members. You can immediately see the pagination links at the top and if you scroll down to the bottom the same pagination links are there as well.
Updated by scott voth over 12 years ago
Hi Dom - I just took a look and now I see the links at the bottom (which I didn't see before). So it seems something has changed. However, the links do not seem to be submitting for me. I can tell the link is correct when I hover over it - but when I click, nothing seems to happen. Maybe a windows issue? I tried in Windows 7 in Firefox and Chrome and the top page links work fine - but the bottom ones do not submit.
Updated by Dominic Giglio over 12 years ago
You're absolutely right. It's def not a windows issue because it doesn't work on my Mac in Safari either.
I'll look into it and let you know what I find.
Updated by Dominic Giglio over 12 years ago
@boone, after a little digging I believe this is a JS issue. I think a click event is getting attached to this pagination element which could be resulting in a "return false;"
I've attached a screenshot of web inspector's Network tab showing POST requests to wp-load.php being requested each time I click on the members pagination links (number AND forward arrow links) at the bottom of the list of members (the links at the top of the list work fine).
Upon further investigation I believe the offending code to be located in the "pagination click event" on line 568 of global.js:
I do not yet understand the exact job of this click event (although it seems pretty straight forward), it appears to differentiate between non-ajax related content and search related terms in order to gather information for the bp_filter_request() function. I looked at that function as well and it appears to be primarily involved with ajax requests, which means it should not be attached to the pagination links since they are not loading through ajax (as far as I can tell).
I have verified that commenting out the "return false;" on line 600 DOES ENABLE the bottom pagination links, however this is not a fix. My hope is that you are more familiar with this function and can shed some immediate light on a possible update. I think together we can knock this issue out no problem.
My current thinking says to add another condition to one of the outer 'if's', but I am hesitant to push any new code until I hear your feedback. I will continue working through the code tonight, let me know what you think whenever you have a spare second.
Updated by Dominic Giglio over 12 years ago
- Estimated time set to 2.00 h
Don't try to comment out the 'return false;' on line 600 in your local dev env - it creates some weird loop that starts downloading a file full of links that rapidly grows to multiple GB's (that's right GIGABYTES)!! :-)
Updated by Dominic Giglio over 12 years ago
Think I might have figured it out. The div containing the top pagination links has a "no-ajax" class. The bottom pagination div DOES NOT have that class. Therefore it is getting caught by the pagination click event, preventing it from properly following the href it links to.
Looking for the template responsible for generating this page now.
Updated by Dominic Giglio over 12 years ago
PROPOSED FIX:
I found the template in bp-default: groups/single/members.php
Line 13 (where the top pagination starts) has the class "no-ajax". Line 66 (where the bottom pagination starts) does not.
I have updated the template in my local env it it DOES fix the issue. However, I am unsure if I am supposed to be editing bp-default.
@boone, please let me know if this is a satisfactory fix and I will push the change up and close this issue.
Updated by Boone Gorges over 12 years ago
Hi Dom. This fix will be fine. I'm not sure why the ajax pagination is not working correctly, but it's a frill we can do without on the Commons. (I personally hate ajax pagination :) URLs 4eva!)
Updated by Dominic Giglio over 12 years ago
- Status changed from Assigned to Resolved
I'm not the biggest fan of ajax either. Most of the time it seems like overkill. I prefer ajax that "enhances" a page rather than completely controls it.
Here's the commit fix:
https://github.com/castiron/cac/commit/3c19a54c0b8d16b9d7b3e19034a146c4b92ac751