Invisible character in closeblock.install leads to a "headers already sent" error on Drupal 7.99

Created on 8 January 2024, 12 months ago
Updated 3 July 2024, 6 months ago

Problem/Motivation

After updating a site to Drupal 7.99 and trying to generate a PDF, I get the following error:

TCPDF ERROR: Some data has already been output, can't send PDF file

A difference with Drupal 7.98 is that in modules/field/field.crud.inc all install files get included instead of only the field's module install file.
Before:

module_load_install($field['module']);

After:

module_load_all_includes('install');

I found out that when closeblock.install was not included during this process, the error went away.

Steps to reproduce

I have not tested it on a clean install yet, but I would think it could be reproduced by generating a PDF using the TCPDF library and including closeblock.install before outputting the PDF.

Proposed resolution

Recreate the closeblock.install file to destroy any invisible characters.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork will follow.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇳🇱Netherlands megachriz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024