Actions
Bug #103690
closedPreview of page in the past (expired) throws exception
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2024-04-20
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Prerequsites¶
- plain TYPO3 12.4.14 installation
steps to reproduce¶
- Create a page, enable it (un-hide), save it
- Tab Access > edit Expiration Date
[endtime]
and set it on a date in the past - save the page and click on the "view" button (or close it and click on the "preview" button)
Expected result¶
You should see a preview of the page (with the "yellow preview box" on the top right corner)
Actual result:¶
An exception is thrown
(1/1) TypeError DateTimeImmutable::setTimestamp(): Argument #1 ($timestamp) must be of type int, string given
$this->context->setAspect( 'date', GeneralUtility::makeInstance( DateTimeAspect::class, (new \DateTimeImmutable())->setTimestamp($queryTime) ) ); return true; }
Note: this seems not reproducible on TYPO3 11 or 13 - you see a preview of the page (with the yellow box); it happens only on 12.4.14
Actions