Project

General

Profile

Actions

Bug #79304

closed

Epic #77562: Misbehaviors with datetime values and timezones

SQL error if empty datetime value is saved

Added by Sascha Egerer over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
-
Target version:
Start date:
2017-01-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
medium
Is Regression:
Yes
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #81548: TCA empty input with renderType => inputDateTime with dbType => date gives error on saveClosed2017-06-12

Actions
Actions #1

Updated by Sascha Egerer over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review over 7 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

Actions #3

Updated by Gerrit Code Review over 7 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

Actions #4

Updated by Gerrit Code Review about 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

Actions #5

Updated by Markus Klein almost 7 years ago

  • Parent task set to #81489
Actions #6

Updated by Markus Klein almost 7 years ago

  • Parent task changed from #81489 to #77562
Actions #7

Updated by Markus Klein almost 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
Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Markus Klein almost 7 years ago

  • Description updated (diff)
Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Gerrit Code Review almost 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

Actions #13

Updated by Gerrit Code Review almost 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

Actions #14

Updated by Sascha Egerer almost 7 years ago

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

Updated by Markus Klein almost 7 years ago

  • Has duplicate Bug #81548: TCA empty input with renderType => inputDateTime with dbType => date gives error on save added
Actions #16

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF