Cannot modify header information…

datePosted on 18:16, August 27th, 2008 by Millan

New GD Star Rating will be released tomorrow, but now I want to talk about the only big problem that rating plugin has right now.

Some users were (are) getting the following error on their blog(s) after rating:

Warning: Cannot modify header information - headers already sent by...

Problem is not plugin related, but theme related. Plugin uses get_header() WordPress call to save cookies. Cookies must be set before any HTML output to the browser. This get_header() call is ment to load page header. Before this function there should be NO HTML output. All Header elements should go in header.php that is loaded with get_header() method (default case).

There are some themes I have come across (I will not point fingers) that before calling get_header() method, have DOCTYPE, HTML and HEAD tags. And they repeat this on index.php, single.php, page.php and other pages. These tags go in header.php. Since only few themes are problem, the theme authors should take a look at large number of valid themes and see how things are done. Or read WordPress documentation and check out default WordPress themes.

If you have such problem on your blog, contact theme author and give them link to this post and ask them to fix the theme.

So, this is the answer to all ‘Cannot modify header information…’ support questions.

VN:R_N [1.0.8_355]
Rating: 0.0/10 (0 votes cast)
  • StumbleUpon
  • TwitThis
  • Technorati
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Fleck
  • YahooMyWeb
  • Live
  • Sphinn
  • co.mments
  • LinkedIn
  • MySpace
  • E-mail this story to a friend!
  • Reddit
categoryPosted in GD Star Rating | printPrint
Related Posts:

Leave a Reply

You must be logged in to post a comment.