Opened 7 years ago
Closed 7 years ago
#7813 closed defect (bug) (fixed)
BP Nouveau: Group activity buttons actions are not working when set options to customizer
Reported by: | dunhakdis | Owned by: | imath |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | has-patch commit |
Cc: |
Description
No plugins installed aside from BuddyPress itself (BuddyPress 3.0 Beta2), using the theme TwentySixteen
Scenario:
1: Go to wp-admin > appearance > customizer > buddypress nouveau > group front page > enable custom front pages for groups (unchecked)
Will return the following (screenshot below):
2: Go to wp-admin > appearance > customizer > buddypress nouveau > group front page > enable custom front pages for groups (checked)
- Activity link in nav appears and actions is now properly working. Home link in nav is set to custom:
Thanks!
Attachments (3)
Change History (7)
#1
@
7 years ago
- Component changed from Groups to Templates
- Keywords needs-refresh reporter-feedback added; has-patch removed
Hi @dunhakdis
Nice catch, i confirm the issue ! Thanks a lot for the patch, i think we can improve it a bit :)
If you look into src/bp-core/bp-core-template.php
you'll find some conditional tags eg: bp_is_group()
is checking the loaded page belongs to a Group. The conditional tag bp_is_group_activity()
should be a nice replacement to the if statement you edited at line 241 ('groups' === bp_current_component() && in_array( bp_current_action(), $activity_actions_in_groups ) )
)
Then we can save the 2 lines of code you added to define $activity_actions_in_groups
.
Can you update the patch this way ?
#2
@
7 years ago
- Keywords has-patch added
Cool! I completely forget about bp_is_group_activity(). I also think that we can completely omit the'groups' === bp_current_component()
condition since bp_is_group_activity()
is already checking whether the current component belongs to 'groups' via bp_is_groups_components()
I'll attach a new diff file shortly. Thanks!
A better solution is recommended. Thanks!