Hi.

Today I have found this error report in watchdog:

Type php

Date Thursday, August 6, 2015 - 09:19

User Anonymous

Location https://.../sitemap.xml

Message Warning: Cannot modify header information - headers already sent by (output started at /sites/all/modules/contrib/xmlsitemap/xmlsitemap.pages.inc:118) in _drupal_session_delete_cookie() (line 466 of /includes/session.inc).

As I can see you are using modified core function file_transfer(). And this bug related with this function. I have found issue described this bug. Please check #16 with patch. https://www.drupal.org/node/2148759#comment-8869415

CommentFileSizeAuthor
#2 xmlsitemap-headers_already_sent-2546646-2.patch732 bytesAlexKirienko
PASSED: [[SimpleTest]]: [MySQL] 525 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

AlexKirienko created an issue. See original summary.

AlexKirienko’s picture

Status: Active » Needs review
FileSize
732 bytes
PASSED: [[SimpleTest]]: [MySQL] 525 pass(es). View

I have ported patch #16 to xmlsitemap_file_transfer(). Please check attached patch.

dpovshed’s picture

Hi Alex,

I had the same problem and the solution you proposed worked for me perfectly!

However, I wasn't able to apply your patch by git apply (I have git v 1.9.1) and entered changes manually.

Probably it makes sense to regenerate the patch without header and footer; in its current form "git apply" just ignore the patch completely.

RenatoG’s picture

Status: Needs review » Reviewed & tested by the community

Hi guys.

I applied the patch and works good for me.

RTBC.

Thank you very much.

Regards.

  • RenatoG committed 40a5d5a on 7.x-2.x authored by AlexKirienko
    Issue #2546646 by AlexKirienko, dpovshed, RenatoG: Warning: Cannot...
RenatoG’s picture

Status: Reviewed & tested by the community » Fixed

Fixed.

Committed to the dev branch.

@alexkirienko; Thank you very much for the contribution.

@dpovshed, this code was been included in the dev branch.

Comming soon exists a new release with this fix.

Good Work and Good Weekend.

Regards.

Status: Fixed » Closed (fixed)

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