Issue Bug Rejected

#102844T3D Import overwrites imported timestamps (crdate, tstamp)

Garvin Hicking 01/17/24, 10:43 updated 01/30/24, 20:28

Description

If T3D data is imported with records or pages that contain a “tstamp” and “crdate” attribute, the import will overwrite these fields with the current timestamp.

That means, the original data is overwritten.

The current behaviour relies on the TCA of a table (e.g. “tt_content” or “pages” or any custom record table), which needs to configure the ['ctrl']['tstamp'] column.

Currently, the logic can thus be circumvented (workaround) by temporarily removing this TCA configuration to import data, and then re-inserting the TCA configuration.

I’d argue that the tstamp column is fine to be overwritten with the import date, because it is a modification of an existing record when being inserted. However the crdate column should not be overwritten to preserve original data.

This opinion is subjective, but I think additional complexity in the Import gui for a toggle to indicate “[x] Keep original crdate” should not be required. Feedback appreciated.

A patch for this is straight-forward, the “import” context can already be deduced in the DataHandler instance and a switch be used. I’ll add a patch for this.

Reference: https://stackoverflow.com/questions/77830219/typo3-v11-t3d-import-preserve-crdate-and-tstamp-values/77830965#77830965

Reviews 1