Project

General

Profile

Actions

Task #78953

closed

Custom FormDataProvider breaks with date related changes

Added by Georg Ringer over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2016-12-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

IMO since the changes of behaviour for date & time fields, at least the extension news breaks with the exception

DateTime::__construct(): Failed to parse time string (2016-12-11T19:41:00+) at position 19 (+): Unexpected character 

How to reproduce:
- install news master
- create a new record
- bam!

Problem is that I do this

$result['databaseRow']['datetime'] = $GLOBALS['EXEC_TIME'];

that means that the change must be at least considered as breaking and the rst must be changed or otherwise allow timestamps and migrate that!

stack trace

DateTime::__construct(): Failed to parse time string (2016-12-13T16:08:04+) at position 19 (+): Unexpected character 

Exception thrown in file
/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php in line 2713.

17 DateTime::__construct("2016-12-13T16:08:04+")

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
02711:                     } else {
02712:                         // ISO 8601 dates
02713:                         $dateTime = new \DateTime($value);
02714:                         // The returned timestamp is always UTC
02715:                         $value = $dateTime->getTimestamp();

16 TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval("2016-12-13T16:08:04+", array, NULL)

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
01790:             }
01791: 
01792:             $res = $this->checkValue_input_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']);
01793: 
01794:             // Process UNIQUE settings:

15 TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForInput("2016-12-13T16:08:04+", array, "tx_news_domain_model_news", "NEW58501ce4e3bba638647143", 8, "datetime")

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
01681:                 break;
01682:             case 'input':
01683:                 $res = $this->checkValueForInput($value, $tcaFieldConf, $table, $id, $realPid, $field);
01684:                 break;
01685:             case 'check':

14 TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_SW(array, "2016-12-13T16:08:04+00:00", array, "tx_news_domain_model_news", "NEW58501ce4e3bba638647143", NULL, "new", 8, NULL, "datetime", NULL, 8)

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
01640: 
01641:         // Perform processing:
01642:         $res = $this->checkValue_SW($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $this->uploadedFileArray[$table][$id][$field], $tscPID);
01643:         return $res;
01644:     }

13 TYPO3\CMS\Core\DataHandling\DataHandler::checkValue("tx_news_domain_model_news", "datetime", "2016-12-13T16:08:04+00:00", "NEW58501ce4e3bba638647143", "new", 8, 8)

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
01484:                     if (isset($GLOBALS['TCA'][$table]['columns'][$field])) {
01485:                         // Evaluating the value
01486:                         $res = $this->checkValue($table, $field, $fieldValue, $id, $status, $realPid, $tscPID);
01487:                         if (array_key_exists('value', $res)) {
01488:                             $fieldArray[$field] = $res['value'];

12 TYPO3\CMS\Core\DataHandling\DataHandler::fillInFieldArray("tx_news_domain_model_news", "NEW58501ce4e3bba638647143", array, array, 8, "new", 8)

/app/web/typo3/sysext/core/Classes/DataHandling/DataHandler.php:
01204:                 }
01205:                 // Processing of all fields in incomingFieldArray and setting them in $fieldArray
01206:                 $fieldArray = $this->fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $theRealPid, $status, $tscPID);
01207:                 $newVersion_placeholderFieldArray = [];
01208:                 if ($createNewVersion) {

11 TYPO3\CMS\Core\DataHandling\DataHandler::process_datamap()


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #77702: Use moment.js and ISO-8601 dates in the backendClosedAndreas Wolf2016-08-30

Actions
Related to TYPO3 Core - Bug #80022: DateTime parse error on edit pages field newUntilClosed2017-02-25

Actions
Actions

Also available in: Atom PDF