Forums

Strange "Cannot modify header info" - stylesheet header link appears on line 1?! (2 posts)

  1. whodafux
    Member
    Posted 8 months ago #

    I'm pretty confused as to where this code is coming from. My blog is giving me the ole

    Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb26d/b44/ipg.kontactproductionsco/index.php:2) in /hermes/bosweb26d/b44/ipg.kontactproductionsco/wp-includes/pluggable.php on line 934

    Cruising on over to validator I decided to run a couple tests to see if I could come to a sollution. I somehow was able to run a full validator (now it only shows the error) and it showed this

    <link href="wp-content/themes/dancefloor/style.css" rel="stylesheet" type="text/css" />
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">

    The only issue here is that the first line of header.php is the doctype declaration. Interestingly enough Validator still pulls the stylesheet link when displaying the error: Linked here.

    I've checked a good amount of my code but I cant for the life of me find where this code is being inserted from. I'm convinced that its the reason im getting the error so the goal here is to delete this code!! I call a link within the head tag for my css later down the code so I just need this taken out. Any insight on the issue is greatly appreciated.

  2. NateJacobs
    Member
    Posted 8 months ago #

    Often times this problem exists because you have some extra whitespace in your file. Take a look at this Codex article.

    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

Reply

You must log in to post.

About this Topic