Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 8 years ago

#4020 closed defect (bug) (fixed)

Empty space cause bp_core_redirect() return header error

Reported by: mkels's profile mkels Owned by: mkels's profile 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)

#1 @DJPaul
13 years ago

  • Keywords reporter-feedback added

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?

Last edited 13 years ago by DJPaul (previous) (diff)

#2 @mkels
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 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Version changed from 1.5.3 to 1.5.4

Confirmed. Fix incoming.

#4 @johnjamesjacoby
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5819]) Remove whitespace from top of bp-default/activity/index.php. Fixes #4020.

#5 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.