Solved

login page error -- cannot modify header information

Posted on 2014-02-06
6
773 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
  • 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
site title bar up too high 5 73
Copying WordPress Pages 5 65
Mobile or not?? 4 50
Filter wordpress query 3 13
How to create your own WordPress Theme Before I begin with the theme design tutorial, I would like to give you the basics of what is required to make a WordPress Theme. The most basic WordPress theme only requires 2 files: a style.css file and an…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now