Bug #105966
closedBackend::getPlainValue() generates invalid values for null dates
100%
Description
https://review.typo3.org/c/Packages/TYPO3.CMS/+/83839 introduced a regression when using nullable \DateTime
properties in entities being stored as DATETIME
in the database.
Prior to that patch, Backend::getPlainValue()
directly returned the incoming null
, now it is converted to an invalid string value of 0000-00-00
If 0000-00-00
is a valid value for database engines is an interesting question but not the issue here. Most probably it's not because such a value is considered invalid during reconstitution of persisted entities as seen in \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::mapDateTime()
where an incoming value 0000-00-00
is cast to null
.
A solution here should be to check if the property allows null. Regardless of the dbType
and the TCA, Extbase should early return the given null
.
Updated by Alexander Schnitzler 27 days ago
- Due date set to 2024-04-17
- Start date changed from 2025-01-20 to 2024-04-17
- Follows Bug #103641: Not possible so set nullable relation values in extbase domain models added
Updated by Gerrit Code Review 27 days ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87814
Updated by Gerrit Code Review 27 days ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87814
Updated by Gerrit Code Review 22 days ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87882
Updated by Anonymous 22 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ff77e4fc77e6f94cce92301c4a48276dad924121.
Updated by Gerrit Code Review 20 days ago
- Status changed from Resolved to Under Review
Patch set 2 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87882
Updated by Gerrit Code Review 20 days ago
Patch set 3 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87882
Updated by Anonymous 19 days ago
- Status changed from Under Review to Resolved
Applied in changeset d0a4a56af742e474131920e5acbb5eefd90c9ea9.