Skip to content

[BUGFIX] Return creation and modification date stored by TYPO3 - #170

Merged
kszymukowicz merged 1 commit into
release/5.0.0from
crdate-response
Oct 5, 2026
Merged

kszymukowicz merged 1 commit into
release/5.0.0from
crdate-response

Conversation

@kszymukowicz

Copy link
Copy Markdown
Collaborator

Extbase sets TCA ctrl.crdate and ctrl.tstamp only in the database row, so after POST, PUT and PATCH the persisted object still held old values (e.g. null for a new record). Models with non-nullable getters (e.g. News::getCrdate(): DateTime in EXT:news) failed during response serialization with HTTP 500, although the record was already saved.

After persisting, stored creation and modification dates are copied from the database to the object. Values are mapped the same way as Extbase maps them when loading the object (including typed properties which are not initialized, empty timestamps and the extbase.consistentDateTimeHandling feature), so the response of write operations is the same as the response of subsequent GET.

Extbase sets TCA `ctrl.crdate` and `ctrl.tstamp` only in the database row, so after POST, PUT and PATCH the persisted object still held old values (e.g. `null` for a new record). Models with non-nullable getters
(e.g. `News::getCrdate(): DateTime` in EXT:news) failed during response serialization with HTTP 500, although the record was already saved.

After persisting, stored creation and modification dates are copied from the database to the object. Values are mapped the same way as Extbase maps them when loading the object (including typed properties which are not initialized, empty timestamps and the `extbase.consistentDateTimeHandling` feature), so the response of write
operations is the same as the response of subsequent GET.
@kszymukowicz
kszymukowicz merged commit 783d181 into release/5.0.0 Oct 5, 2026
26 of 50 checks passed
@kszymukowicz
kszymukowicz deleted the crdate-response branch October 5, 2026 12:09
@kszymukowicz kszymukowicz added the bug Something isn't working label Oct 5, 2026
@kszymukowicz kszymukowicz self-assigned this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant