Bug #82528

SYS_LASTCHANGED value not being correctly set if RESTORE_REGISTER is used

Added by Presedo Roberto about 4 years ago. Updated about 2 months ago.

Status:
New
Priority:
Must have
Assignee:
-
Category:
Frontend
Start date:
2017-09-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.0
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

Each time TYPO3 renders a content element, it stores its timestamp value in SYS_LASTCHANGED in the REGISTER, keeping it warm until the end of the page rendering process
-> in \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::lastChanged

and then saving then value in the DB.
-> in \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setSysLastChanged

If you use RESTORE_REGISTER cObject in your TS, it will reset the Register, setting it back to the previous values
-> in \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::render

So if RESTORE_REGISTER is used in a TYPOSCRIPT, the registered SYS_LASTCHANGED value is reset before being stored in the DB, so SYS_LASTCHANGED updates are may never be saved in DB.

SYS_LASTCHANGED temp value should not be set in Register in order to avoid it being reset.


Files

RestoreRegisterContentObject.php (1.34 KB) RestoreRegisterContentObject.php Reindl Bernd, 2021-05-28 07:02

Related issues

Related to TYPO3 Core - Bug #90827: If you edit the page content element, the "Last Mod." does not change.Needs Feedback2020-03-25

Actions

Also available in: Atom PDF