Skip to:
Content
Pages
Categories
Search
Top
Bottom

500 error when changing Group Tabs


  • quantumfrog
    Participant

    @quantumfrog

    Hi everyone,
    I have the following problem:
    When I change the Group Tab names and reorder them, it is not possible to create a new Group.
    it returns an 500 error when I come to the second creation step which comes from my Group Extension where I created a new Group Tab.
    Its maybe important to know that I changed the default Group Tab with:

    define( 'BP_GROUPS_DEFAULT_EXTENSION', 'my_new_tab_slug' );

    I used the action hook and function described in the Navigation API of the documentation.

    my Snippet is:

    //Action to rename Group Tabs
    add_action( 'bp_actions', 'bp_change_group_tabs');
    //Function to Rename Group Tabs
    function bp_change_group_tabs() {
    
        if ( ! bp_is_group() ) {
            return;
        }
         buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Projekteinstellungen', 'buddypress' ) ), 'admin', bp_current_item() );
         buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Dozenten einladen', 'buddypress' ) ), 'invite-anyone', bp_current_item() );
         buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Dokumente', 'buddypress' ) ), 'docs', bp_current_item() );
         buddypress()->groups->nav->edit_nav( array( 'name' => __( 'Projektaktivität', 'buddypress' ) ), 'home', bp_current_item() );
    
         buddypress()->groups->nav->edit_nav( array( 'position' => 2 ), 'home', bp_current_item() );
         buddypress()->groups->nav->edit_nav( array( 'position' => 5 ), 'docs', bp_current_item() );
    }

    When I decomment the buddypress()->groups->nav->edit_nav functions everything works again. Is this a bug?

    Any help would be nice.
    Thanks

  • You must be logged in to reply to this topic.
Skip to toolbar