-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disabled settings trigger errors upon saving #2210
Comments
Adding contao/core-bundle/src/EventListener/DataContainer/DisableAppConfiguredSettingsListener.php Lines 55 to 57 in 5324c34
|
But that's not really how |
I don’t know. Setting a |
Yeah, I guess you are right. |
But intuitively I would also expect the To make this work we could change contao/core-bundle/src/Resources/contao/library/Contao/Widget.php Lines 809 to 812 in af6fbee
if (!$this->mandatory || !$this->blnSubmitInput)
|
Should we not return immediately if we know that the widget does not submit anything? protected function validator($varInput)
{
if (!$this->submitInput())
{
return null;
}
if (\is_array($varInput)) |
And is this not the actual cause of the error? contao/core-bundle/src/Resources/contao/classes/DataContainer.php Lines 375 to 388 in af6fbee
Why validate a widget that does not submit any input? |
I honestly don’t know for what I think I would just extend the check in
|
I don't think returning on empty content is correct (as suggested by @ausi). We must not validate a widget that does not submit input (which is the case if it is disabled, or the widget has only presentational purpose). |
That is what I think, too. |
I just looked at this again: If |
Description ----------- | Q | A | -----------------| --- | Fixed issues | Fixes contao#2210 | Docs PR or issue | - Commits ------- 2f83d0a Do not validate widgets that do not submit input
Affected version(s)
Contao 4.10
Description
Since #1382, settings defined in the app configuration are disabled in the back end. When trying to save the form, however, these fields trigger errors:
The text was updated successfully, but these errors were encountered: