#103690Preview of page in the past (expired) throws exception
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.