Solved

login page error -- cannot modify header information

Posted on 2014-02-06
6
816 Views
Last Modified: 2014-02-12
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
Comment
Question by:dougfosterNYC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39839071
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
 
LVL 14

Expert Comment

by:Dzynit
ID: 39842331
In case the problem could be fixed in the theme's functions.php file, could you post the code from it here?
0
 

Author Comment

by:dougfosterNYC
ID: 39842345
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 14

Expert Comment

by:Dzynit
ID: 39842405
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
 

Accepted Solution

by:
dougfosterNYC earned 0 total points
ID: 39843400
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
 

Author Closing Comment

by:dougfosterNYC
ID: 39852817
I figured out the issue myself.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you use a default hosting installation of wordpress with the intention of it being your actual site?  Maybe you’ve installed it as a Blog to your current site and recently converted it to be the main site and do away with the old .htm pages.  An…
WordPress can be pretty daunting, especially for a beginner, so I thought it might be a good idea to write an article to show how easy it is to get started in WordPress and to design a custom theme.  The first step is to check with your hosting comp…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question