block_date.module contains a single blank line. All .module files are autoloaded by Drupal, this then causes a blank line at the top of all HTML output. This isn't always a problem but for e.g. xmlsitemap this has the side effect of making the XML invalid because the XML declaration is expected to be on the first line of the file and this pushes it to the second line.

In Drupal 8 .module files are no longer required so the file can simply be deleted.

CommentFileSizeAuthor
#2 3225466.patch153 byteslongwave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
FileSize
153 bytes
borutpiletic’s picture

I can confirm, this can cause a lot of issues on your site.

Apart from getting "headers already sent" warning messages, image styles also stopped working for me (image style files for new images will not get generated).

I am using this patch right now, it removes empty module file as expected :)

Thanks!

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for confirming this solves the issue, marking RTBC based on the above comment.

junaidpv’s picture

Priority: Normal » Critical

This issue leads to corrupted configuration export .gz.tar file as well. Marking as critical.

dmezquia’s picture

Hi @rameshbabug please can you add @longwave as maintainer ?? He is interested in helping with this module.

  • longwave committed 0e1c2ff on 1.0.x
    Issue #3225466 by longwave: Blank line in .module file causes blank line...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

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