Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#9 | cannot_modify_headers-2012852-9.patch | 296 bytes | Anonymous (not verified) |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedThis 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..
Comment #2
georgedamonkey CreditAttribution: georgedamonkey commentedAh, ok. So, for the time being it's safe to just ignore the errors?
Comment #3
jcnventura CreditAttribution: jcnventura commentedYes.
But I'll leave this open to remind me to look at it.
Comment #4
georgedamonkey CreditAttribution: georgedamonkey commentedThank you. I really appreciate that.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedAny progress? Could it be that some other modules interfere?
Comment #6
Nathaniel CreditAttribution: Nathaniel commentedI'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()
Similarly in 7.x-2.x
Comment #7
milodescNathaniel, 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.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, Nathaniel. #6 fixed it for us. Hope that it will be included in the next version.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous at Cheeky Monkey Media commentedI created a patch from the suggestion in #6
Comment #10
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedComment #12
jcnventura CreditAttribution: jcnventura at 1xINTERNET commented