Cannot modify header information - headers already sent

ica - January 7, 2006 - 05:05
Project:K2
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Just updated a test site from 463 to 470b2
Error on all pages below

* warning: Cannot modify header information - headers already sent by (output started at /home/wrap/public_html/dp/themes/k2/template.php:12) in /home/wrap/public_html/dp/includes/common.inc on line 247.
* warning: Cannot modify header information - headers already sent by (output started at /home/wrap/public_html/dp/themes/k2/template.php:12) in /home/wrap/public_html/dp/includes/common.inc on line 247.

#1

ica - January 7, 2006 - 07:17
Title:varios errors after the update» K2 theme 4.7 various errors after the update - solution i found after digging some

take out
?>

at the end of template.php on K2 theme
it should be checked on and fixed on theme download

#2

chrisada - January 8, 2006 - 04:17
Title:K2 theme 4.7 various errors after the update - solution i found after digging some» Cannot modify header information - headers already sent

The error indeed came from that line in the code.

Removing the closing php tag seems to help. But I still don't understand why it help.

#3

ica - January 8, 2006 - 06:20

me neither.. i turnedup here and posted the errors i got.. no one replied.. so after many hours trial/error i discovered this... (if i remember correctly i have checked the another working theme's code)

yes a code should be closed at the end but this is not the case on themes
anyways.. it should be debugged properly.. but the theme works now

#4

tclineks - January 10, 2006 - 08:27
Status:active» needs review

There is a trailing space -- that's the issue.

Here's a patch to clean that and few other issues with template.php

AttachmentSize
k2-template.php-cleanup.patch 452 bytes

#5

chrisada - January 16, 2006 - 16:23
Status:needs review» fixed

This and some other changes are in HEAD now. I tagged it as 4.7, but somehow the tarball isn't updated for a few days now.

#6

Anonymous - January 30, 2006 - 16:31
Status:fixed» closed

#7

introfini - March 10, 2006 - 15:51
Version:<none>» 4.7.x-1.x-dev

I think this must be a bug in the PHPtemplate engine, because the php tag should be closed.

introfini
onossocasamento.pt

#8

introfini - March 10, 2006 - 16:02

sorry, it was the is a trailing space issue.

introfini
onossocasamento.pt

 
 

Drupal is a registered trademark of Dries Buytaert.