getgrav / getgrav/grav-plugin-admin

Enabling gzip throws an error

Open
#756 7 comments 0 reactions 0 assignees View on GitHub
bug more info needed
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

Grav 1.1.3, Admin 1.1.4

With Caching enabled when I enable gzip I get this error

Server Error
Sorry, something went terribly wrong!

E_WARNING - Cannot modify header information - headers already sent by (output started at /[root]/public_html/system/src/Grav/Common/Grav.php:341)
For further details please review your logs/ folder, or enable displaying of errors in your system configuration.

Logs:

2016-08-31 15:42:19] grav.CRITICAL: Cannot modify header information - headers already sent by (output started at /[root]/public_html/system/src/Grav/Common/Grav.php:341) - Trace: #0 [internal function]: Whoops\Run->handleError(2, 'Cannot modify h...', '/[root]/p...', 351, Array) #1 /[root]/public_html/system/src/Grav/Common/Grav.php(351): header('Content-Length:...') #2 [internal function]: Grav\Common\Grav->shutdown() #3 {main} [] []

The change persists/is successful

![2016-09-01_9-19-26](https://cloud.githubusercontent.com/assets/8940155/18173468/ec9b7a38-7026-11e6-88e0-1a7c15aadec9.jpg)

Contributor guide

Open the contributing guide

Research direction

Start with system/src/Grav/Common/Grav.php around lines 341 and 351, where the shutdown path reports the header warning, then reproduce the issue by enabling caching and gzip in Grav Admin. Done means gzip can be enabled without the server error while the setting remains saved.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.