Bug #79304
closedEpic #77562: Misbehaviors with datetime values and timezones
SQL error if empty datetime value is saved
100%
Description
If a TCA input field of dbType datetime is saved with an empty value a SQL error is triggered.
1: These fields of record 1 in table "tx_datetimetest_domain_model_history" have not been saved correctly: date_time_native! The values might have changed due to type casting of the database.
Example configuration (from styleguide extension)
'input_37' => [ 'exclude' => 1, 'label' => 'input_37 dbType=datetime eval=datetime', 'config' => [ 'dbType' => 'datetime', 'type' => 'input', 'size' => 20, 'eval' => 'datetime', 'checkbox' => 0, 'default' => '0000-00-00 00:00:00' ], ],
2: SQL error: 'Incorrect datetime value: '0' for column 'input_37' at row 1' (tx_styleguide_elements_basic:1)
This can be reproduced with the Acceptance tests./bin/codecept run -f Acceptance -c components/testing_framework/core/Build/AcceptanceTests.yml typo3/sysext/core/Tests/Acceptance/Backend/Formhandler/ElementsBasicCest.php:checkThatValidationWorks_EvalDateTime_DbTypeDateTime
They (sometimes) are successfull but the sql error message is visible for a short time
Updated by Gerrit Code Review almost 8 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/51296
Updated by Gerrit Code Review almost 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Markus Klein over 7 years ago
- Parent task changed from #81489 to #77562
Updated by Markus Klein over 7 years ago
- Priority changed from Should have to Must have
- Target version set to next-patchlevel
- Complexity set to medium
- Is Regression changed from No to Yes
Updated by Gerrit Code Review over 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Gerrit Code Review over 7 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51296
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53174
Updated by Sascha Egerer over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ad166708c68f49bc22c64b975ffe6a5b80cbc2ec.
Updated by Markus Klein over 7 years ago
- Has duplicate Bug #81548: TCA empty input with renderType => inputDateTime with dbType => date gives error on save added