Skip to content

Commit f79609c

Browse files
committed
Fixed #18611
1 parent a8412c2 commit f79609c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Fixed a bug where exceptions thrown when sending emails weren’t getting handled properly. ([#18597](https://github.com/craftcms/cms/issues/18597))
1212
- Fixed a bug where unordered lists weren’t getting styled correctly within Tip/Warning/Markdown field layout UI elements. ([#18598](https://github.com/craftcms/cms/issues/18598))
1313
- Fixed an error that could occur when upgrading to Craft 5. ([#18576](https://github.com/craftcms/cms/issues/18576))
14+
- Fixed a bug where nested Matrix entries’ Title fields were getting validation errors if blank, even if the nested entry was disabled. ([#18611](https://github.com/craftcms/cms/discussions/18611))
1415

1516
## 5.9.17 - 2026-03-17
1617

src/fields/Matrix.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,13 +1450,12 @@ private function validateEntries(ElementInterface $element): void
14501450
$scenario = $element->getScenario();
14511451

14521452
foreach ($entries as $entry) {
1453+
/** @var Entry $entry */
14531454
$entry->setOwner($element);
14541455

1455-
/** @var Entry $entry */
1456-
if (
1457-
$scenario === Element::SCENARIO_ESSENTIALS ||
1458-
($entry->enabled && $scenario === Element::SCENARIO_LIVE)
1459-
) {
1456+
if (!$entry->enabled) {
1457+
$entry->setScenario(Element::SCENARIO_ESSENTIALS);
1458+
} else {
14601459
$entry->setScenario($scenario);
14611460
}
14621461

0 commit comments

Comments
 (0)