Project

General

Profile

Actions

Bug #90841

open

DataHandler-Bugfix: When "sorting"-field of DB-record will be updated, then the "tstamp"-field of that DB-record should also be updated

Added by Jürgen Kußmann about 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2020-03-26
Due date:
% Done:

0%

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

Description

When the "sorting"-field of a DB-record (e.g. tt_content-record) will be updated, than also the 'tstamp'-field of that related DB-record should be updated. In our TYPO3-installation, we use the "tstamp"-field of DB-records to check, if the DB-record has changed. So, for us, it's very, very important, that the "tstamp"-field will always be updated, when the DB-record will change. So, this litle bugfix is crucial for us.

The bugfix is a no-brainer and easy to implement/adopt. The bugfix works fine in TYPO3 8. The same bug also exists in TYPO3 v9 and v10, so you have to fix the bug also for that versions.

Best regards,
Jürgen Kußmann
Software Developer
AOE GmbH


Files

Actions #1

Updated by Benni Mack about 4 years ago

Hey Jürgen,

thanks for your report. I guess we would need to check if the history (sys_history) is added there as well (this is usually an info that the record was modified).

Actions #2

Updated by Oliver Hader about 4 years ago

Hi Jürgen, nice to read from you here again :)

From an EventSourcing point of view (we don't have EventSourcing in the core) I totally get to point to check what has changed and only process/project those changes - e.g. trigger rendering of pages that were changed or warm-up their caches again.

Usually the meaning of "tstamp" was "modified by editor" which actually would not be the case when the sorting value was updated because some other record was inserted and sorting values had to be reprocessed.

I need to think a little bit about potential implications...

Actions #3

Updated by Jürgen Kußmann about 4 years ago

Hi Oli,
there are several code examples inside the DataHandler-class, where the tstamp (of a none editor changed DB-record) is updated. The "position" where i added the logic to update the tstamp was only the last one, which didn't contain such a logic. Man könnte also sagen, dass durch meinen Fix die Logik (zum updaten des tstamps) in der DataHandler-Klasse nun überall vorhanden ist - und nicht nur lückenhaft ;-)

Oliver Hader wrote:

Hi Jürgen, nice to read from you here again :)

From an EventSourcing point of view (we don't have EventSourcing in the core) I totally get to point to check what has changed and only process/project those changes - e.g. trigger rendering of pages that were changed or warm-up their caches again.

Usually the meaning of "tstamp" was "modified by editor" which actually would not be the case when the sorting value was updated because some other record was inserted and sorting values had to be reprocessed.

I need to think a little bit about potential implications...

Actions #4

Updated by Oliver Hader about 4 years ago

Alright then... I did not check in detail when tstamp is updated and when not... if it's updated in other places as well, I'm fine with completing the missing spots

Actions #5

Updated by Gerrit Code Review about 4 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63961

Actions #6

Updated by Gerrit Code Review about 4 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63962

Actions #7

Updated by Oliver Hader about 4 years ago

Actions #8

Updated by Jürgen Kußmann about 4 years ago

Hi Oli,
i can't login at https://review.typo3.org. But nevertheless, the code looks good for me at https://review.typo3.org.

Best regards,
Jürgen

Oliver Hader wrote:

Actions #9

Updated by Gerrit Code Review almost 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63961

Actions #10

Updated by Oliver Hader almost 4 years ago

  • Status changed from Under Review to New
  • Target version deleted (next-patchlevel)
  • Complexity deleted (no-brainer)
Actions

Also available in: Atom PDF