Commit 55ab3de
committed
[BUGFIX] Add FormEngine transformation for dbType=datetime in flexforms
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).
Releases: main, 13.4, 12.4
Resolves: #105550
Related: #104309
Change-Id: Ibbf4b4e709358247d6eb8d006bedb05818f1d9c2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86912
Reviewed-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Andreas Kienast <akienast@scripting-base.de>
Tested-by: Andreas Kienast <akienast@scripting-base.de>
Tested-by: Benjamin Franzke <ben@bnf.dev>
Tested-by: core-ci <typo3@b13.com>1 parent 3e3381a commit 55ab3de
File tree
5 files changed
+98
-63
lines changed- Build/Sources/TypeScript/backend
- tests
- typo3/sysext
- backend/Resources/Public/JavaScript
- core/Configuration
- styleguide/Configuration/TCA
5 files changed
+98
-63
lines changedLines changed: 5 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
151 | 149 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 150 | + | |
| 151 | + | |
162 | 152 | | |
163 | | - | |
| 153 | + | |
164 | 154 | | |
165 | | - | |
166 | | - | |
| 155 | + | |
167 | 156 | | |
168 | | - | |
| 157 | + | |
169 | 158 | | |
170 | | - | |
171 | 159 | | |
172 | 160 | | |
173 | 161 | | |
| |||
Lines changed: 84 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 68 | | |
81 | 69 | | |
82 | 70 | | |
| |||
90 | 78 | | |
91 | 79 | | |
92 | 80 | | |
93 | | - | |
| 81 | + | |
94 | 82 | | |
95 | | - | |
| 83 | + | |
96 | 84 | | |
97 | 85 | | |
98 | 86 | | |
99 | | - | |
100 | | - | |
| 87 | + | |
| 88 | + | |
101 | 89 | | |
102 | 90 | | |
103 | 91 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 92 | | |
111 | 93 | | |
112 | 94 | | |
| |||
120 | 102 | | |
121 | 103 | | |
122 | 104 | | |
123 | | - | |
| 105 | + | |
124 | 106 | | |
125 | | - | |
| 107 | + | |
126 | 108 | | |
127 | 109 | | |
128 | 110 | | |
129 | | - | |
| 111 | + | |
130 | 112 | | |
131 | | - | |
| 113 | + | |
132 | 114 | | |
133 | 115 | | |
134 | 116 | | |
135 | | - | |
| 117 | + | |
136 | 118 | | |
137 | | - | |
138 | | - | |
| 119 | + | |
| 120 | + | |
139 | 121 | | |
140 | 122 | | |
141 | | - | |
| 123 | + | |
142 | 124 | | |
143 | | - | |
144 | | - | |
| 125 | + | |
| 126 | + | |
145 | 127 | | |
146 | 128 | | |
147 | | - | |
| 129 | + | |
148 | 130 | | |
149 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
150 | 138 | | |
151 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
164 | 206 | | |
165 | 207 | | |
166 | 208 | | |
| |||
0 commit comments