Skip to content

Commit

Permalink
Do not validate widgets that do not submit input (see contao#2261)
Browse files Browse the repository at this point in the history
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes contao#2210
| Docs PR or issue | -

Commits
-------

2f83d0a Do not validate widgets that do not submit input
  • Loading branch information
leofeyer authored and Alexej Kossmann committed Apr 6, 2021
1 parent 8d23806 commit 374ee45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core-bundle/src/Resources/contao/classes/DataContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -385,7 +385,7 @@ protected function row($strPalette=null)
$this->noReload = true;
}
}
elseif ($objWidget->submitInput())
else
{
$varValue = $objWidget->value;

Expand Down

0 comments on commit 374ee45

Please sign in to comment.