Opened 9 years ago
Last modified 9 years ago
#7639 new defect (bug)
Reopening #4706: Infinite Redirect Loop when BP_GROUPS_DEFAULT_EXTENSION is changed on Private groups
| Reported by: | pareshradadiya | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Contributions |
| Component: | Groups | Version: | 2.9.2 |
| Severity: | normal | Keywords: | needs-patch reporter-feedback |
| Cc: |
Description
I have set group default extension to a Members tab for a group and there is now redirect loop when non group member try to access the private group.
While redirecting away from a private group, BuddyPress doesn't appending 'home/' to the redirect URL any longer.
Change History (4)
#3
@
9 years ago
To reproduce, please do the following
- Add this constant
define( 'BP_GROUPS_DEFAULT_EXTENSION', 'members' );in wp-config.php - Login as Subscriber user
- Navigate to Groups directory
- Browse private in which current logged in user is not a member
The issue is, thats there is redirect loop.
BuddyPress try to load default extension Members and since the group is private and current logged in user is not a member of that group, user will be threw back to a group default page(home) which is Members extension in this case and this goes in loop.
Please see this screencast: http://recordit.co/pTslqSjrbp
#4
@
9 years ago
- Milestone Under Consideration → Future Release
The redirect is being triggered on https://buddypress.trac.wordpress.org/browser/trunk/src/bp-core/bp-core-buddybar.php?annotate=blame#L676 (that branch of that conditional). $subnav_item item there is:
array(11) {
["slug"]=>
string(7) "members"
["parent_slug"]=>
string(2) "t3"
["user_has_access"]=>
bool(false)
["no_access_url"]=>
string(30) "http://bpcore.local/groups/t3/"
["site_admin_only"]=>
bool(false)
["screen_function"]=>
&string(27) "groups_screen_group_members"
["name"]=>
string(22) "Members 1"
["link"]=>
string(30) "http://bpcore.local/groups/t3/"
["css_id"]=>
string(7) "members"
["position"]=>
int(60)
["show_in_admin_bar"]=>
bool(false)
}
...which is the navigation item set here: https://buddypress.trac.wordpress.org/browser/trunk/src/bp-groups/classes/class-bp-groups-component.php#L576 ("Only add the members subnav if it's not the home's nav.") -- that makes sense, but I'm lost trying to understand what should be happening where...
It's something to do with the user not allowed to read a Private group's "members" page, but I'm not sure where the redirect should be fixed or how.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Please provide instructions how exactly to configure the group extension like this, so we can test it.