Issue Bug Closed

#96069TCA Input field validator

JAKOTA Design Group GmbH 11/24/21, 16:52 updated 10/04/22, 14:13

Description

Hi, I’m running into this error:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key “value” in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1737

TCA Setup

‘email’ => [
‘exclude’ => true,
‘label’ => ‘Email’,
‘config’ => [
‘type’ => ‘input’,
‘size’ => 30,
‘eval’ => ‘nospace,email,required’,
‘default’ => ‘’,
],
],

Saving the form with something other than an email.

This
// Skip range validation, if the default value equals 0 and the input value is 0, “0” or an empty string.
// This is needed for timestamp date fields with [‘range’][‘lower’] set.
$skipRangeValidation =
isset($tcaFieldConf[‘default’])
&& (int)$tcaFieldConf[‘default’] = 0
&& ($res['value'] = ‘’ || $res[‘value’] = '0' || $res['value'] = 0);

need to be that way

// Skip range validation, if the default value equals 0 and the input value is 0, “0” or an empty string.
// This is needed for timestamp date fields with [‘range’][‘lower’] set.
$skipRangeValidation =
isset($tcaFieldConf[‘default’]) && isset($res[‘value’])
&& (int)$tcaFieldConf[‘default’] = 0
&& ($res['value'] = ‘’ || $res[‘value’] = '0' || $res['value'] = 0);

Thanks

Reviews 2