Download & Extend

Cannot modify header information - headers already sent

Project:K2
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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

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

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

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

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

Status:fixed» closed (fixed)

#7

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

sorry, it was the is a trailing space issue.

introfini
onossocasamento.pt

nobody click here