CartSession headers issue with big pipe sessionless

Created on 25 March 2021, over 3 years ago
Updated 19 January 2024, 8 months ago

Describe your bug or feature request.

When running a commerce platform with big pipe sessionless, big pipe could run without an session.
Meaning that a cart could be rendered in a big pipe situation without a started session.
Meaning that

class CartSession
  public function getCartIds($type = self::ACTIVE) {
    $key = $this->getSessionKey($type);
    return $this->session->get($key, []);
  }

will try to start it after headers are already send.

If a bug, provide steps to reproduce it from a clean install.

Install big pipe sessionless with commerce. Implement a request as an anonymous user without a session.
This happens when a cart block then is rendered through the getCarts method in the CartProvider.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Cart

Created by

🇳🇱Netherlands jefuri

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024