From 374ee45a6d5300676475967fee95f22a2125117e Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Wed, 9 Sep 2020 09:06:10 +0200 Subject: [PATCH] Do not validate widgets that do not submit input (see #2261) Description ----------- | Q | A | -----------------| --- | Fixed issues | Fixes #2210 | Docs PR or issue | - Commits ------- 2f83d0ab Do not validate widgets that do not submit input --- core-bundle/src/Resources/contao/classes/DataContainer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-bundle/src/Resources/contao/classes/DataContainer.php b/core-bundle/src/Resources/contao/classes/DataContainer.php index 702744cba7c..59475807a09 100644 --- a/core-bundle/src/Resources/contao/classes/DataContainer.php +++ b/core-bundle/src/Resources/contao/classes/DataContainer.php @@ -373,7 +373,7 @@ protected function row($strPalette=null) } // Validate and save the field - if (\in_array($this->strInputName, $paletteFields) || Input::get('act') == 'overrideAll') + if ($objWidget->submitInput() && (\in_array($this->strInputName, $paletteFields) || Input::get('act') == 'overrideAll')) { $objWidget->validate(); @@ -385,7 +385,7 @@ protected function row($strPalette=null) $this->noReload = true; } } - elseif ($objWidget->submitInput()) + else { $varValue = $objWidget->value;