Solved

login page error -- cannot modify header information

Posted on 2014-02-06
6
826 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

734 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