Problem/Motivation

Error in the watchdog
RuntimeException: Failed to start the session because headers have already been sent by "/vendor/symfony/http-foundation/Response.php" at line 410. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 116 of /vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)

The backtrace mention the stack middleware.

Steps to reproduce

My guess is that this error is triggered by bots, because they ignore cookies.

Proposed resolution

Investigating this issue, I think I'm gonna remove the stack middleware to go with a PageCachePolicy which seems a better, more robust way of getting the same result.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

aporie created an issue. See original summary.

aporie’s picture

Issue summary: View changes

aporie changed the visibility of the branch 3566410-runtimeexception-errors to hidden.

aporie changed the visibility of the branch 3566410-runtimeexception-errors to active.

aporie’s picture

Status: Active » Fixed

Released as major 1.1.0.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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