#8629 closed defect (bug) (invalid)
BP_DEFAULT_COMPENENT is not honoured for picking a profile landing page
Reported by: | davelwd | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 14.0.0 | Priority: | normal |
Severity: | normal | Version: | 10.0.0 |
Component: | Core | Keywords: | dev-feedback needs-patch |
Cc: |
Description
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?
Change History (4)
#1
@
5 months ago
- Milestone changed from Awaiting Review to Up Next
- Owner set to espellcaste
- Status changed from new to assigned
@davelwd I actually can't reproduce this bug using the latest version, 12.5.1.