Bug #85726

Preview of page not working when publish date is set

Added by Marieke de Bruin over 1 year ago. Updated about 2 months ago.

Must have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


It's not possible to preview a page if the publish date is set in the future.
You will get a 404 page with a message like this

The CMS isn't able to fetch the requested page /index.php?id=1&ADMCMD_simTime=1533393060 at this moment.

This is both for editors and admins.

Way to reproduce
Create a page and set a pubish date in the future. Press save and view page.

TYPO3 8.7.18

Related issues

Related to TYPO3 Core - Bug #86653: Preview of page, with "show", not working when starttime is set Under Review 2018-10-14

Associated revisions

Revision b2cbbaae (diff)
Added by Steffen Mächtel 4 months ago

[BUGFIX] Show page preview with starttime from backend

Adjust timestamp to UTC in backend utility for generated query parameter

Now it has the same value as using the preview input field of the
AdminPanel (UTC).

Resolves: #85726
Releases: 8.7
Change-Id: Ia9a5b1e40901fdf2adf924abef558f4dbce7c76b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59066
Tested-by: TYPO3com <>
Tested-by: Riny van Tiggelen <>
Tested-by: Richard Haeser <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Tobi Kretschmann <>
Reviewed-by: Riny van Tiggelen <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Richard Haeser <>


#1 Updated by Stephan Auer over 1 year ago

I can reproduce it too.
Interesting thing - with Version 8.7.9 the preview is working. So maybe a "fix" after that version was resulting into that issue.

UPDATE: At 8.7.9 there is some Snippet at sysext/frontend/Classes/View/AdminPanelView.php#89 where the admPanel is listening at GP['ADMCMD_simTime']
It seems like this was kicked in later 8.7 LTS Versions - and also in 9.4 there is no occurrence for "ADMCMD_simTime" in the code (reading). So maybe this is a feature? :-P

#2 Updated by David Hoeckele over 1 year ago

seems to be related with this issue: https://forge.typo3.org/issues/66793

#3 Updated by Riccardo De Contardi about 1 year ago

It seems still broken in 8.7.19 but working on the latest master 9.5.1-dev. Can someone confirm?

#4 Updated by Riccardo De Contardi about 1 year ago

  • Category set to Frontend

#5 Updated by Susanne Moog about 1 year ago

  • Status changed from New to Needs Feedback

I cannot reproduce this on current 8-branch anymore - can you still reproduce it?

My steps:
- Create a page with a content element
- Set publish date for page in the future
- click "view page"

Result: Preview marker on the top right frontend page and page is displayed, no errors.

#6 Updated by Steffen Mächtel about 1 year ago

I have the same problem.

The Preview dont works on pages with start time.

TYPO3 8.7.19

I can see that the timestamp witch will added to the URL "ADMCMD_simTime=" is 1 hour to small. If i change this value manuel, then the preview works.

To test this from Typo3 backend, i changed the value in class TYPO3\CMS\Backend\Utility\BackendUtility in line 4921:

+3600 added to starttime

$simTime = '&ADMCMD_simTime=' . ($pageInfo['starttime'] + 3600);

--------------------------- UPDATE: ---------------------------

the timestamp added to "ADMCMD_simTime=" looks fine. The Problem starts in TypoScriptFrontendController.

$simTime -= date('Z', $simTime);

This line removes 1 hour in my case :-( When i remove this line for tests. The preview from Backend ("Show") works.

My timezone is Europe/Berlin.

--------------------------- UPDATE 2: ---------------------------

i have tested this with TYPO3 9.5.0 and its not working too.

see new created issue https://forge.typo3.org/issues/86653

#7 Updated by Riccardo De Contardi about 1 year ago

  • Related to Bug #86653: Preview of page, with "show", not working when starttime is set added

#8 Updated by Gerrit Code Review 11 months ago

  • Status changed from Needs Feedback to Under Review

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/59066

#9 Updated by Steffen Mächtel 11 months ago


The AdminPanel preview input field handles timestamp different to
"page show".
  • The page "starttime" is safed in database in current server timezone.
  • The AdminPanel uses UTC for preview, wich is adjusted later in
    the TypoScriptFrontendController to server timezone.
  • The query parameter ADMCMD_simTime from "page show" use the database
    value without adjustments (server timezone). This value is also be
    adjusted in TypoScriptFrontendController. But it was already in
    server timezone.

The patch change ADMCMD_simTime query parameter also to UTC like

Current handling:

Startdate: 00:00 15-02-2019

Database: 1550185200 => Server Timezone (In this case Europe/Berlin)
AdminPanel: 1550188800 => UTC
Page show: 1550185200 => Server Timezone (In this case Europe/Berlin)

With patch applied:

Startdate: 00:00 15-02-2019

Database: 1550185200 => Server Timezone (In this case Europe/Berlin)
AdminPanel: 1550188800 => UTC
Page show: 1550188800 => UTC

#10 Updated by Tymoteusz Motylewski 11 months ago

@Steffen, is the fix for master (v9) the same/similar to v8? Then the patch needs to be pushed first to master branch and then it will be backported to v8

#11 Updated by Steffen Mächtel 11 months ago

I think for v9 there need to be more/different changes. Becouse in v9 the adminpanel dont handles ADMCMD_simTime query parameter at all.
I have already created a new issue for that: https://forge.typo3.org/issues/86653

#12 Updated by Steffen Mächtel 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#13 Updated by Romain Tiger about 2 months ago

Hi ! I tested this patch and it works fine on typo3 v8 but only for admin account.
With non-admin account, I get the parent page rendered (instead of 404 before applying the patch)

Is there a solution for that bug ?

Also available in: Atom PDF