Skip to content

[8.0-stable] Fix exception in admin when current language is deleted#3792

Merged
tvdeyen merged 1 commit into8.0-stablefrom
backport/8.0-stable/pr-3790
Mar 26, 2026
Merged

[8.0-stable] Fix exception in admin when current language is deleted#3792
tvdeyen merged 1 commit into8.0-stablefrom
backport/8.0-stable/pr-3790

Conversation

@alchemycms-bot
Copy link

Backport

This will backport the following commits from main to 8.0-stable:

Questions ?

Please refer to the Backport tool documentation

This fixes a situation where the session contains a language id for a
language that no longer exists because it has been deleted.

This commit fixes this in two ways:

- when deleting the language, it is removed from the session if the
language is identical
- when trying to get the language from the session id, the lookup code
now falls back to the default language if it can't be found. This is
meant to fix the scenario where a different user deletes the language
instead of the user with the language id in the session

I believe both fixes are useful.

I've tried to come up with meaningful tests but I am somewhat unfamiliar
with the codebase so feel free to suggest extra things.

A backport to Alchemy 7 would be appreciated if possible, as it will
probably still take us a while to get to 8.

(cherry picked from commit 380d62c)
@alchemycms-bot alchemycms-bot bot requested a review from a team as a code owner March 26, 2026 17:45
@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.20%. Comparing base (ca388f1) to head (3adb954).
⚠️ Report is 3 commits behind head on 8.0-stable.

Additional details and impacted files
@@             Coverage Diff             @@
##           8.0-stable    #3792   +/-   ##
===========================================
  Coverage       97.20%   97.20%           
===========================================
  Files             288      288           
  Lines            7576     7579    +3     
===========================================
+ Hits             7364     7367    +3     
  Misses            212      212           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdeyen tvdeyen merged commit 11aa7f1 into 8.0-stable Mar 26, 2026
16 checks passed
@tvdeyen tvdeyen deleted the backport/8.0-stable/pr-3790 branch March 26, 2026 19:28
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.

2 participants