Here is the function where I create a dynamic Menu . This function is called from a ‘wp_nav_menu_items’ filter function. The below function creates a dynamic menu based on the buddypress groups the user is entitled to. The idea is to provide navigation to the groups directly via a Menu.
The menu renders properly, however when clicked I get the warning. I know I can suppress the warning by turning WP_DEBUG off, but the fact that it does not throw an warning, when I navigate to the group page via going to groups page and then selecting the individual group, but only does when I navigate via this function makes me think there must be a better way.