The session is lost when all caches are wiped

Created on 27 May 2025, 6 days ago

Problem/Motivation

In πŸ› Flush all caches once done Active , we added a general cache wipe in the final stages of the install process. This broke something -- normally, the installer sends you into Drupal fully logged in, but this no longer happens. You're sent to a login screen.

Steps to reproduce

Install Drupal using a profile built on Recipe Installer Kit.

Proposed resolution

The problem seems to be the drupal_flush_all_caches() call in \Drupal\RecipeKit\Installer\Hooks::uninstallProfile(). It seems to wipe out the session. It's not entirely clear why that happens, but our best guess is that the container rebuild causes the session storage to change, thus losing the session.

To work around this, we can explicitly save the session before calling drupal_flush_all_caches(). Manual testing confirms that this gets us past the problem.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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