Project

General

Profile

Actions

Bug #96069

closed

TCA Input field validator

Added by JAKOTA Design Group GmbH almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2021-11-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72283

Actions #2

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72294

Actions #3

Updated by Oliver Bartsch almost 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF