[buddypress-trac] [BuddyPress Trac] #8629: BP_DEFAULT_COMPENENT is not honoured for picking a profile landing page
buddypress-trac
noreply at wordpress.org
Mon Jan 31 08:51:58 UTC 2022
#8629: BP_DEFAULT_COMPENENT is not honoured for picking a profile landing page
--------------------------+--------------------------------------
Reporter: davelwd | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 10.0.0
Severity: normal | Keywords: dev-feedback needs-patch
--------------------------+--------------------------------------
I'm not using the custom front page and want a default tab to be opened
when a site visitor lands on /members/[member-name] I've tried setting
BP_DEFAULT_COMPONENT and used the "profile" value as a default. This
doesn't work, neither does setting any other valid value.
I've tracked through the source code and this should be applied in
/bp-members/classes/class-bp-members-component.php
Line 302 for the function setup_canonical_stack()
Following that through I can see it fails on line 321
bp_is_active($default_component)
This function is in /bp-core/bp-core-template.php line 2084
and has two arguments, if the second isn't specified then it seems it will
never return anything. So in this case by calling bp_is_active without a
second argument then it will always fail and not apply the default
component.
I'm not sure if this should be corrected by changing the call inside the
setup_canonical_stack function and adding a second argument or should the
handling change in the bp_is_active function?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8629>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list