Project

General

Profile

Actions

Bug #102844

closed

T3D Import overwrites imported timestamps (crdate, tstamp)

Added by Garvin Hicking 4 months ago. Updated 3 months ago.

Status:
Rejected
Priority:
Should have
Category:
Import/Export (T3D)
Start date:
2024-01-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review 4 months 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/+/82494

Actions #2

Updated by Gerrit Code Review 4 months 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/+/82494

Actions #3

Updated by Gerrit Code Review 4 months ago

Patch set 3 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/+/82494

Actions #4

Updated by Gerrit Code Review 4 months ago

Patch set 4 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/+/82494

Actions #5

Updated by Gerrit Code Review 4 months ago

Patch set 5 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/+/82494

Actions #6

Updated by Gerrit Code Review 4 months ago

Patch set 6 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/+/82494

Actions #7

Updated by Garvin Hicking 4 months ago

  • Assignee set to Garvin Hicking
Actions #8

Updated by Gerrit Code Review 4 months ago

Patch set 7 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/+/82494

Actions #9

Updated by Stefan Bürk 3 months ago

Will abandon this patch as crdate and tsstamp should be stay core controlled.

Actions #10

Updated by Stefan Bürk 3 months ago

  • Status changed from Under Review to Rejected
Actions #11

Updated by Benni Mack 3 months ago

Closing this ticket: Why? If we import data, the date of the import is important. Why is that? If we take the "original crdate", I do think we should consider the whole record lifecycle with it, and that is also sys_history to it.

Actions

Also available in: Atom PDF