fix: non existence default category layout when migrating (backport: 6.7.9.x)#16378
Merged
Marcel Kräml (mkraeml) merged 1 commit intoApr 22, 2026
Conversation
|
OpenAPI Snapshot
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 6.7.9.x #16378 +/- ##
==========================================
Coverage ? 61.09%
==========================================
Files ? 4728
Lines ? 171555
Branches ? 9772
==========================================
Hits ? 104816
Misses ? 63865
Partials ? 2874
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Marcel Kräml (mkraeml)
approved these changes
Apr 22, 2026
Florian Robel (frobel)
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport: #16294
Summary
This PR hardens the handling of
core.cms.default_category_cms_pagewhen the configured CMS page no longer exists.The normal delete protection stays unchanged: if a CMS page is configured as a default, deleting it still throws an exception. This change only targets stale system config data that may already exist because of legacy data, direct DB changes, or other out-of-band inconsistencies.
What Changed
CategorySubscribercms_page_idduring category writes when the configured default is empty, invalid, or points to a missing CMS pageMigration1776691515SetDefaultCmsPageIdForCategoriessystem_configWhy
A stale
core.cms.default_category_cms_pagecan lead to invalid foreign key payloads being written intocategory.cms_page_id.This can break:
With this change, both paths fail safely instead of trying to persist a non-existent CMS page reference.
Behavior