Opened 10 years ago
Closed 8 years ago
#6217 closed defect (bug) (no action required)
Subnav items: Optional?
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Core | Keywords: | needs-patch |
Cc: |
Description
The second param in BP_Component::setup_nav()
is noted in the method comments as being optional but when I try to pass just $main_nav
like in the example below, my main nav item isn't added to the navigation.
class BP_My_Component extends BP_Component { function setup_nav() { // Stuff. parent::setup_nav( $main_nav ); } }
When I visit the page I get a 404. For example: http://example.com/members/username/my-main-nav-item
Ref: https://github.com/buddypress/BuddyPress/blob/master/src/bp-core/bp-core-component.php#L408
Change History (3)
#1
@
10 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#2
@
10 years ago
I've just tested again (after flushing permalinks) and things now work as expected. I'm slightly puzzled as to why that resolved the problem but sorry to have wasted your time. Maybe the ticket you opened provided a fix and was subsequently closed?
Please feel free to close the ticket.
I'm almost positive I opened a ticket just like this one in the past 12 months, but I can't find it. Yes, let's fix it :)