Hello,

I'm running the latest dev version of the Print module, and I'm noticing a ton of errors in the server logs. The locations for all these follow a similar path:

http://www.oshkoshpubliclibrary.org/print/xxxx

This is the error message:

Warning: Cannot modify header information - headers already sent by (output started at xxxx/bootstrap.inc:1364) in drupal_send_headers() (line 1212 of xxxx/bootstrap.inc).

Any ideas what may be wrong?

CommentFileSizeAuthor
#9 cannot_modify_headers-2012852-9.patch296 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

This is because of this #1223560: charset of "printer-friendly" is ISO, but should be "utf-8"?.

At some point the Drupal bootstrap process stopped sending the html headers. So now, the module does it for Drupal.. Apparently in some cases, something tries to send the headers again. Nothing much I can do..

georgedamonkey’s picture

Ah, ok. So, for the time being it's safe to just ignore the errors?

jcnventura’s picture

Yes.

But I'll leave this open to remind me to look at it.

georgedamonkey’s picture

Thank you. I really appreciate that.

Anonymous’s picture

Any progress? Could it be that some other modules interfere?

Nathaniel’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

I'm seeing this when the page is 404 - not found.
/print/404-test

Adding else drupal_exit() seems to solve the issue.

7.x-1.x
print.pages.inc function print_controller_html()

if ($print !== FALSE) {
  ...
}
else {
  drupal_exit();
}

Similarly in 7.x-2.x

if ($node) {
  ...
}
else {
  drupal_exit();
}
milodesc’s picture

Nathaniel, that seems to be the general approach folks are taking to fix this issue. There's an issue here with a similar fix that's been RTBC, but I think you're execution might be better. It might be worth posting there as well.

Anonymous’s picture

Thanks, Nathaniel. #6 fixed it for us. Hope that it will be included in the next version.

Anonymous’s picture

Status: Active » Needs review
FileSize
296 bytes

I created a patch from the suggestion in #6

jcnventura’s picture

  • jcnventura committed b823398 on 7.x-2.x
    Issue #2012852 by rsmylski, jcnventura, asennus1, Nathaniel, milodesc:...
jcnventura’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.