So, should I submit this as a bug ticket?
I am having the exact same problem. I submitted it as a ticket:
https://buddypress.trac.wordpress.org/ticket/4706
What is happening is its trying to redirect to the home tab, then the change default filter moves it to the other tab, which causes the loop.
Until its fixed simply add ‘/home’ to the line mentioned in the ticket.
Just wrap that define with code that tests if a user is a member of group.
Or, if group is private and user is not member
Hi,
I have the same problem, i tried this :
but it doesn’t work, am i doing something wrong ?
Besides i got a warning message :
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /homez.38/centrale/www/demo/demo/INELSE/wp-content/plugins/bp-custom.php:10) in /homez.38/centrale/www/demo/demo/INELSE/wp-content/plugins/events-manager/classes/em-notices.php on line 11
If someone has a solution, it would be really great
Sorry, here is what i tried :
function redirect_to_forum() {
global $bp;
if( bp_is_group_members() )
define(‘BP_GROUPS_DEFAULT_EXTENSION’, ‘forum’ );
}
add_action( ‘wp’, ‘redirect_to_forum’ );
This is not tested but you don’t want the define to run if a member is not a member of a private group.
if ( bp_group_is_visible && bp_is_group_member() ) {
define(‘BP_GROUPS_DEFAULT_EXTENSION’, ‘forum’ );
}
Thanks,
Actually i think that your code should work and that my problem may be not where i thought. problem.
When i use
define(‘BP_GROUPS_DEFAULT_EXTENSION’, ‘forum’ );
it works but when i put it in a function like that, nothing happens:
function redirect_to_forum(){
define('BP_GROUPS_DEFAULT_EXTENSION', 'forum' );
}
add_action('wp','redirect_to_forum');
So, i think that’s why nothing happens when i try to add your code.
Do you know what’s wrong with my function ?
Does someone know where is the problem ?
Thanks