Project

General

Profile

Actions

Bug #1257

closed

Next Page Navigation missing at bottom of page when looking at Group Members

Added by scott voth about 13 years ago. Updated over 12 years ago.

Status:
Resolved
Priority name:
Low
Assignee:
Dominic Giglio
Category name:
BuddyPress (misc)
Target version:
Start date:
2011-10-22
Due date:
% Done:

0%

Estimated time:
2.00 h
Deployment actions:

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

pagination_click_event.png (506 KB) pagination_click_event.png Dominic Giglio, 2012-03-10 12:20 AM
Actions #1

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
Actions #2

Updated by Boone Gorges over 12 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.

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

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:

https://github.com/castiron/cac/blob/master/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/global.js#L568

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.

Actions #7

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)!! :-)

Actions #8

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.

Actions #9

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.

https://github.com/castiron/cac/blob/master/wp-content/plugins/buddypress/bp-themes/bp-default/groups/single/members.php#L66

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.

Actions #10

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!)

Actions #11

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

Actions

Also available in: Atom PDF