Opened 13 years ago
Closed 13 years ago
#4072 closed defect (bug) (fixed)
bp_groups_default_extension makes group activity inaccessible
Reported by: | boonebgorges | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | needs-patch reporter-feedback dev-feedback |
Cc: |
Description
When changing the default Group tab via the 'bp_groups_default_extension' filter, you lose access to the content that was originally on the 'home' tab, which in most cases is Activity. If we detect that 'home' has been changed, we should add another subnav item for Activity (in the setup_nav() method).
Change History (8)
#2
@
13 years ago
Sure. On the latest trunk, put the following in bp-custom.php or another plugin file:
function bbg_change_group_extension( $e ) { return 'members'; } add_filter( 'bp_groups_default_extension', 'bbg_change_group_extension' );
Now visit a group. You will see the Members content by default. Try clicking on the Home tab (where Activity normally lives). You will be directed back to the home tab.
#3
follow-up:
↓ 4
@
13 years ago
This is a regression from somewhere. It worked, sometime in the unknown past. :)
#4
in reply to:
↑ 3
@
13 years ago
- Keywords dev-feedback added
Replying to johnjamesjacoby:
This is a regression from somewhere. It worked, sometime in the unknown past. :)
I lied. Looks like this never worked completely. Since it's a 1.6 feature introduced in r5228, it's safe to revert? Paul, thoughts?
#5
@
13 years ago
I'd like to find a way to make it work, as it's a not-uncommonly-requested feature, and the only possible way of doing it right now is really an awful mess :) http://wordpress.stackexchange.com/questions/44863/whats-the-easiest-way-to-change-the-default-landing-page-for-buddypress-groups/45286#45286
We have some fallback logic for this already in the Members component https://buddypress.trac.wordpress.org/browser/trunk/bp-members/bp-members-loader.php#L105 So we would just need something similar.
#6
@
13 years ago
Maybe be we should standardize default extensions implementation in BP_Component class, something like new argument to sub_nav
array e.g. default => true
and component class will generate bp_{$component}_default_extension
filter.
#7
@
13 years ago
I confirm this issue.
Heavily using this filter in my BP Groups Extras (drag-n-drop group menu items reordering).
#8
@
13 years ago
- Resolution set to fixed
- Status changed from new to closed
(In [5971]) Reconfigure the way that the default group extension gets communicated to BP_Groups_Component::setup_nav().
By ensuring that the top-level single-group navigation item has its default_subnav_slug set dynamically to the correct default_extension, we ensure that the Home (Activity) tab remains accessible even when it is not the default.
Fixes #4072
Can't reproduce, @boonebgorges can you provide more details.