From c271193a87a59122c55dd4f7a83e367d31322728 Mon Sep 17 00:00:00 2001 From: Rias Date: Thu, 1 Oct 2026 10:14:56 +0200 Subject: [PATCH 1/2] Fix card designer preview element type Co-authored-by: Nathaniel Hammond --- CHANGELOG.md | 1 + .../js/modules/field-layout-designer/card-view-designer.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3adee70813c..fd052b55154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ - Fixed a bug where pressing Ctrl/Cmd + S in a slideout could also save the page behind it. ([#19705](https://github.com/craftcms/cms/pull/19705)) - Fixed a bug where Shift-selecting a shorter range didn’t deselect items outside the new range. ([#19727](https://github.com/craftcms/cms/pull/19727)) - Fixed a bug where select inputs could lose their selected value if their options were loaded asynchronously. ([#19728](https://github.com/craftcms/cms/pull/19728)) +- Fixed a bug where card designer previews could fail to render because the preview request omitted the element type. ([#19665](https://github.com/craftcms/cms/pull/19665)) ### Assets - Migrated Control Panel uploads to the native Uppy picker and shared upload sessions, including user photos. diff --git a/resources/js/modules/field-layout-designer/card-view-designer.ts b/resources/js/modules/field-layout-designer/card-view-designer.ts index d4b9ad2e08c..2f165a7dd8a 100644 --- a/resources/js/modules/field-layout-designer/card-view-designer.ts +++ b/resources/js/modules/field-layout-designer/card-view-designer.ts @@ -135,6 +135,10 @@ export class CardViewDesigner extends Base { data: { fieldLayoutConfig: { ...this.designer.config, + // Not part of `this.designer.config` (that lives at + // `designer.settings.elementType` instead), but `CardDesigner::previewHtml()` + // needs a `type` on the layout config to instantiate a sample element. + type: this.designer.settings!.elementType, generatedFields: document .querySelector('craft-generated-fields-table') From 5c47b98a8feeb9e53a8928463a3748badf770e84 Mon Sep 17 00:00:00 2001 From: Rias Date: Thu, 1 Oct 2026 10:15:08 +0200 Subject: [PATCH 2/2] Reference card preview extraction PR in changelog Co-authored-by: Nathaniel Hammond --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd052b55154..f4ca8d178fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,7 @@ - Fixed a bug where pressing Ctrl/Cmd + S in a slideout could also save the page behind it. ([#19705](https://github.com/craftcms/cms/pull/19705)) - Fixed a bug where Shift-selecting a shorter range didn’t deselect items outside the new range. ([#19727](https://github.com/craftcms/cms/pull/19727)) - Fixed a bug where select inputs could lose their selected value if their options were loaded asynchronously. ([#19728](https://github.com/craftcms/cms/pull/19728)) -- Fixed a bug where card designer previews could fail to render because the preview request omitted the element type. ([#19665](https://github.com/craftcms/cms/pull/19665)) +- Fixed a bug where card designer previews could fail to render because the preview request omitted the element type. ([#19776](https://github.com/craftcms/cms/pull/19776)) ### Assets - Migrated Control Panel uploads to the native Uppy picker and shared upload sessions, including user photos.