#4020 closed defect (bug) (fixed)
Empty space cause bp_core_redirect() return header error
Reported by: | mkels | Owned by: | mkels |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | 1.5.4 |
Component: | Templates | Keywords: | reporter-feedback |
Cc: | mkelsinger@… |
Description
component like activity/index.php groups/index.php and others had a line at top like this
<?php /** * Template Name: BuddyPress - Activity Directory * * @package BuddyPress * @subpackage Theme */ ?> <?php get_header( 'buddypress' ); ?>
this cause header already sent output when i use bp_core_redirect or wp_redirect....simple solution would be removing the space like this
<?php /** * Template Name: BuddyPress - Activity Directory * * @package BuddyPress * @subpackage Theme */ ?> <?php get_header( 'buddypress' ); ?>
Change History (5)
#2
@
13 years ago
hi djpaul..actually it wasnt a plugin..its a function i added to theme functions.php to redirect not logged in user like
function get_out_now() { if ( bp_is_profile_component() || bp_is_activity_component() || bp_is_member() ) { if( !is_user_logged_in() ) { bp_core_redirect( $bp->root_domain . '/' . bp_get_root_slug( 'register' ) ); } } } add_filter('get_header', 'get_out_now');
using add_action('wp_head' or 'bp_head') also had the same result.
#3
@
13 years ago
- Milestone changed from Awaiting Review to 1.6
- Version changed from 1.5.3 to 1.5.4
Confirmed. Fix incoming.
Note: See
TracTickets for help on using
tickets.
I know what you mean, but I've not seen this error before in BuddyPress core. Can you elaborate when/how you are doing the redirect? It is in a plugin we can download and try?