Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 9 years ago

#6217 closed defect (bug) (no action required)

Subnav items: Optional?

Reported by: henry.wright Owned by:
Priority: normal Milestone:
Component: Core Version:
Severity: normal 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 @boonebgorges
12 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release

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 :)

#2 @henry.wright
12 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.

Last edited 12 years ago by henry.wright (previous) (diff)

#3 @tw2113
9 years ago

  • Milestone Future Release
  • Resolution → invalid
  • Status new → closed

Marking as closed as requested by @henry.wright

Note: See TracTickets for help on using tickets.