#8129 closed defect (bug) (fixed)
Custom BP_FRIENDS_SLUG won't work anymore to display someone friends activities
Reported by: | Maniou | Owned by: | imath |
---|---|---|---|
Milestone: | 5.0.0 | Priority: | normal |
Severity: | normal | Version: | 3.0.0 |
Component: | Activity | Keywords: | has-patch |
Cc: |
Description
Hi,
If you define on wp-config :
define ( 'BP_FRIENDS_SLUG', 'amis' );
You can't filter a user's friend activities on his profil page.
Without BP_FRIENDS_SLUG :
https://domain.com/members/dupond/activity/friends/ > OK
With BP_FRIENDS_SLUG defined to "amis" :
https://domain.com/members/dupond/activity/amis/ > 404
It used to work before Buddypress V3.0
Thank you for your help !
Attachments (2)
Change History (11)
#2
@
5 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.0.0
- Version changed from 4.3.0 to 3.0.0
Hi @Maniou
Thanks a lot for your feedback. I confirm the issue and I've been able to reproduce it for the friends slug and also for the groups slug.
I'm going to check all the slug constants in every component's late_include()
method to see if there are more potential issues like this one and add a patch asap.
#4
@
5 years ago
- Keywords has-patch added; needs-patch removed
So am I @Maniou :)
I've looked every BP_Activity_Component::late_includes()
methods and only found the issue there. 8129.patch is fixing the issue for me.
You're welcome to test ;) I'll probably commit it in the coming days.
#5
@
5 years ago
Thanks @imath
I've got this error : "PHP Fatal error: Uncaught Error: Call to undefined function bp_get_groups_slug()"
If it's can help you my Buddypress version is 4.3.0 and the "Groups" module is not activated.
Thanks again,
#7
@
5 years ago
Ouch! My bad!! I made a beginner's mistake. I forgot to check components were active. Thanks a lot for your test, you saved the 5.0.0-beta1 release!!
8129.2.patch should fix the issue.
Thanks for your feedback @dcavins
I guess the problem is relative to Late includes method in class-bp-activity-component.php
Specially to this part :
line 128 :
if ( bp_is_user() && in_array( bp_current_action(), array( 'friends', 'groups', 'favorites', 'mentions' ), true ) ) { require $this->path . 'bp-activity/screens/' . bp_current_action() . '.php'; }
when accessing https://domain.com/members/dupond/activity/amis/
bp_current_action() is equal to "amis"
and the code can't get the screen bp-activity/screens/friends.php to load