Bug #85726

Preview of page not working when publish date is set

Added by Marieke de Bruin 7 months ago. Updated 2 months ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2018-08-02
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

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.

Environment
TYPO3 8.7.18


Related issues

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

History

#1 Updated by Stephan Auer 7 months 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 6 months ago

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

#3 Updated by Riccardo De Contardi 4 months 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 4 months ago

  • Category set to Frontend

#5 Updated by Susanne Moog 4 months 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 4 months 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 4 months ago

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

#8 Updated by Gerrit Code Review 2 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 2 months ago

Problem:

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
AdminPanel.

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 2 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 2 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

Also available in: Atom PDF