Review 13.4 Merged

87067[BUGFIX] Add FormEngine transformation for dbType=datetime in flexforms

Benjamin Franzke CR +2 V +2 Normal +102 −67 updated 11/19/24, 19:44

Commit message

The database-to-backend-from transformation for dbType=datetime fields
(which are supposed to be stored in native databse DATETIME fields,
but are stored as datetime strings in flexforms) were not configured.
As a consequence the raw value (not an ISO8601 string, but Date + Time
separated by a space-char) was passed into formengine and incorrectly
interpreted as timestamp, because it failed to be parsed as a ISO8601
date.

Add this configuration and remove the previously erroneously used
timestamp parsing which is no longer needed since #104309 and was
only implicitly used to transform the datetime, which hid
this bug by resolving into an incorrectly created date.
For this invalid case we'll now throw an error instead of hiding
this case with an invalid transformation.

Note that this cleanup is related to #104309, but the issue has
been present before. Prior to #104309 the field was rendered
as "Invalid DateTime", while the switch to ISO8601 in #104309
resulted in an invalid date to be generated:
A flexform value like "1960-01-01 05:42:23" was interpreted as 1960
seconds (unix timestamp) after 1970 which results in a fake-date to be
calculated: 1970-01-01T00:32:40Z (32:40 because 1960s = 32 * 60 + 40).

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 2

Files 5

Review log 23

  1. Benjamin Franzke uploaded patch set 1 11/19/24, 19:31

  2. core-ci voted on patch set 1 V +1 11/19/24, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69743

  3. Benjamin Franzke merged patch set 2 11/19/24, 19:44