Skip to content

[FIX] v3.x: Preserve import flash for non-database session drivers#1079

Closed
erhanurgun wants to merge 1 commit into
vitodeploy:3.xfrom
erhanurgun:fix/import-flash-non-database-session
Closed

[FIX] v3.x: Preserve import flash for non-database session drivers#1079
erhanurgun wants to merge 1 commit into
vitodeploy:3.xfrom
erhanurgun:fix/import-flash-non-database-session

Conversation

@erhanurgun
Copy link
Copy Markdown
Contributor

@erhanurgun erhanurgun commented May 3, 2026

Closes #1080.

Default SESSION_DRIVER is redis (config/session.php:21), so any install on the defaults runs into this. The unconditional swap to the file driver writes the success flash to a store the next request never reads, so the redirect comes back without a toast and the user has no way to tell whether the import worked.

Limiting the swap to the database driver leaves every other driver untouched. Behavior on database is unchanged.

vendor/bin/phpunit tests/Feature/VitoSettingsTest.php
OK (3 tests, 11 assertions)

@erhanurgun erhanurgun force-pushed the fix/import-flash-non-database-session branch from 5e26916 to e88c57b Compare May 3, 2026 12:32
@erhanurgun erhanurgun changed the title [FIX] Preserve import flash for non-database session drivers [FIX] v3.x: Preserve import flash for non-database session drivers May 3, 2026
Settings import unconditionally switched the active session driver to
file so that the in-progress sqlite swap could not destroy the active
session. On the default redis driver this rerouted the flash payload to
a store the next request never reads, so the success toast never fired
and the user was left guessing whether the import had run.

Restrict the swap to the database driver, which is the only one that
shares storage with the imported sqlite file.

Adds two feature tests covering both branches.
@erhanurgun erhanurgun force-pushed the fix/import-flash-non-database-session branch from e88c57b to fa06402 Compare May 3, 2026 13:03
@erhanurgun
Copy link
Copy Markdown
Contributor Author

Closing this. After deeper testing the fix does not address the observable behaviour: the success flash never reaches the next request even on the default redis driver and even with the swap untouched. The toast was missing for a different reason than the one I described, and I do not want to leave a misleading patch open. I will reopen if I can isolate the real cause.

@erhanurgun erhanurgun closed this May 3, 2026
@erhanurgun erhanurgun deleted the fix/import-flash-non-database-session branch May 3, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] v3.x: Settings import shows no toast on non-database session drivers

1 participant