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
Updated by Stefan Bürk 7 months ago
- Related to Bug #103588: PreviewSimulator for time restricted pages added
- Related to Bug #99627: Context:class don't detect timezone correctly added
- Related to Bug #98045: DateAspect->getTimezone (almost) never returns the correct value added
Updated by Stefan Bürk 7 months ago
Should be fixed with -> https://review.typo3.org/c/Packages/TYPO3.CMS/+/83742
Updated by Riccardo De Contardi 7 months ago
- Status changed from Needs Feedback to Closed
I close this issue in favor of https://forge.typo3.org/issues/103588 - refer to it for the patch.
Thanks to Stefan Bürk for taking care
Actions