diff --git a/CHANGELOG.md b/CHANGELOG.md index 062f077d1c3..6ad494c257e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - When slideouts are opened within Live Preview, they now slide up over the editor pane, rather than covering the preview pane. ([#13739](https://github.com/craftcms/cms/pull/13739)) - Cross-site validation now only involves fields which were actually modified in the element save. ([#13675](https://github.com/craftcms/cms/discussions/13675)) - Row headings within Table fields now get statically translated. ([#13703](https://github.com/craftcms/cms/discussions/13703)) +- Element condition settings within field layout components now display a warning if the `autosaveDrafts` config setting is disabled. ([#12348](https://github.com/craftcms/cms/issues/12348)) - Added the `resave/addresses` command. ([#13720](https://github.com/craftcms/cms/discussions/13720)) - The `resave/matrix-blocks` command now supports an `--owner-id` option. - Added `craft\helpers\App::phpExecutable()`. diff --git a/src/base/FieldLayoutComponent.php b/src/base/FieldLayoutComponent.php index 53c54c1537d..49a1b938f3a 100644 --- a/src/base/FieldLayoutComponent.php +++ b/src/base/FieldLayoutComponent.php @@ -261,6 +261,12 @@ public function getSettingsHtml(): string 'instructions' => Craft::t('app', 'Only show when editing {type} that match the following rules:', [ 'type' => $elementType::pluralLowerDisplayName(), ]), + 'warning' => !Craft::$app->getConfig()->getGeneral()->autosaveDrafts + ? sprintf( + '`autosaveDrafts` must be enabled for this condition to take effect automatically when editing %s.', + $elementType::pluralLowerDisplayName(), + ) + : null, ]); } }