Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 922
  • Last Modified:

login page error -- cannot modify header information

i have a client's wordpress site that the login page throws an error.  It shows two "Warning: Cannot modify header information" errors at the top of the login.. when I do login, it shows a bunch of them and that is it (see pasted text at bottom).

the site is http://www.francescastanfill.com.  

I do have a full backupbuddy backup for it on my Amazon S3, from a few days ago and from a month ago, but i am hoping somebody can see the error messages and have a quick solution rather than do a full restore, which I've never done.

I'm hoping it is a plugin issue.. and I'm guessing i'm going to have to remove them to see if the error goes away... but it does reference the functions.php file....


Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-login.php on line 384

Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-login.php on line 396

Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-includes/pluggable.php on line 678

Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-includes/pluggable.php on line 679

Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-includes/pluggable.php on line 680

Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-includes/pluggable.php on line 875
0
dougfosterNYC
Asked:
dougfosterNYC
  • 3
  • 2
1 Solution
 
Jason C. LevineNo oneCommented:
It's most likely a plugin problem.  If you are using a caching plugin, clear the cache and then disable all plugins and see if the messages come back.  If not, enable plugins one at a time and test between each activation to see which one is causing the issue.
0
 
DzynitCommented:
In case the problem could be fixed in the theme's functions.php file, could you post the code from it here?
0
 
dougfosterNYCAuthor Commented:
yikes.. and i sometimes get the following error in the website.. It looks very similar.  Tell me if you get the following error:
Warning: Cannot modify header information - headers already sent by (output started at /home/stanfill/public_html/wp-content/themes/prose/functions.php:1) in /home/stanfill/public_html/wp-includes/pluggable.php on line 875

Here is the functions.php code..

/**
 * Include Genesis theme files
 */
require_once(TEMPLATEPATH.'/lib/init.php');

/**
 * Include Prose theme files
 */
require_once(STYLESHEETPATH.'/lib/init.php');

// Add support for custom background
if (function_exists('add_custom_background')) {
    add_custom_background();
}

// Reposition the Primary Navigation
remove_action('genesis_after_header', 'genesis_do_nav');
add_action('genesis_before_header', 'genesis_do_nav');

/**
 * Modify the size of the Gravatar in the author box
 * 
 * @param int $size
 */
function prose_gravatar_size($size) {
    return '60'; 
}
add_filter('genesis_author_box_gravatar_size', 'prose_gravatar_size');

/**
 * Add widgeted footer section
 */
function prose_include_footer_widgets() {
    require_once(CHILD_DIR . '/footer-widgeted.php');
}
add_action('genesis_before_footer', 'prose_include_footer_widgets'); 

// Reposition the footer
remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_do_footer');
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
add_action('genesis_after', 'genesis_footer_markup_open', 5);
add_action('genesis_after', 'genesis_do_footer');
add_action('genesis_after', 'genesis_footer_markup_close', 15);

/**
 * Customize the footer section
 *
 * @param string $creds
 * @return string 
 */
function prose_footer_creds_text($creds) {
	$creds = __('Copyright', 'genesis') . ' [footer_copyright] [footer_childtheme_link] '. __('on', PROSE_DOMAIN) .' [footer_genesis_link] · [footer_wordpress_link] · [footer_loginout]';
	return $creds;
}
add_filter('genesis_footer_creds_text', 'prose_footer_creds_text');

// Register widget areas
genesis_register_sidebar(array(
	'name'=>'Footer #1',
	'description' => __('This is the first column of the footer section.', PROSE_DOMAIN),
	'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
	'name'=>'Footer #2',
	'description' => __('This is the second column of the footer section.', PROSE_DOMAIN),
	'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
genesis_register_sidebar(array(
	'name'=>'Footer #3',
	'description' => __('This is the third column of the footer section.', PROSE_DOMAIN),
	'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));

/*----------------Additions by FSI -----------------------*/
// Edit the read more link text
//add_filter('get_the_content_more_link', 'custom_read_more_link');
//add_filter('the_content_more_link', 'custom_read_more_link');
add_filter('get_the_excerpt', 'custom_read_more_link');
function custom_read_more_link($excerpt) {
	$excerpt_more = '';
	$excerpt_more = '<br /><br />&nbsp;<a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More >></a>';
	return $excerpt . $excerpt_more;
}


add_filter( 'genesis_breadcrumb_args', 'child_breadcrumb_args' );
function child_breadcrumb_args( $args ) {
    $args['home']                    = '';
    $args['sep']                     = '';
    $args['list_sep']                = ', '; // Genesis 1.5 and later
    $args['prefix']                  = '<div class="breadcrumb">';
    $args['suffix']                  = '</div>';
    $args['heirarchial_attachments'] = true; // Genesis 1.5 and later
    $args['heirarchial_categories']  = true; // Genesis 1.5 and later
    $args['display']                 = true;
    $args['labels']['prefix']        = '';
    $args['labels']['author']        = 'Archives for ';
    $args['labels']['category']      = ''; // Genesis 1.6 and later
    $args['labels']['tag']           = '';
    $args['labels']['date']          = 'Archives for ';
    $args['labels']['search']        = 'Search for ';
    $args['labels']['tax']           = 'Archives for ';
    $args['labels']['post_type']     = 'Archives for ';
    $args['labels']['404']           = 'Not found: '; // Genesis 1.5 and later
    return $args;
}

/*
// remove the "filed under" before the categories
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
*/
/*----------------Additions by Marknetgroup-----------------------*/

add_action('get_header', 'child_remove_page_titles');
function child_remove_page_titles() {
  if (is_front_page()) {
    remove_action('genesis_post_title', 'genesis_do_post_title');
  }
}

if ( function_exists( 'add_image_size' ) ) { 
	add_image_size( 'home_page', 228, 9999, true ); //(cropped)
}

Open in new window

0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
DzynitCommented:
I'd try removing the section at the end under "Additions by Marknetgroup" and see if it makes any difference.

(And yes, I saw that error message when I viewed your site here: )http://www.francescastanfill.com/wp-admin/

I don't see either error on the frontend. I only suggest trying the removal of that code at the end because it looks to be the last custom code addition. The only other section I'd guess on is line 11 - 14 about the custom background. It looks as if it's possible to be part of a backend function that might be conflicting with something.
0
 
dougfosterNYCAuthor Commented:
ok, so i figured it out.. crazy... it wasn't a plugin at all...

it was trailing white space at the end of the functions.php file... geez...

http://wordpress.org/support/topic/that-darn-message-again-warning-cannot-modify-header-information
0
 
dougfosterNYCAuthor Commented:
I figured out the issue myself.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now