diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php index 0635fc8cf274..82d3bee0c4c6 100644 --- a/typo3/sysext/frontend/Classes/Page/PageRepository.php +++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php @@ -242,8 +242,11 @@ protected function init($show_hidden) $userAspect = $this->context->getAspect('frontend.user'); $frontendUserIdentifier = 'user_' . (int)$userAspect->get('id') . '_groups_' . md5(implode(',', $userAspect->getGroupIds())); + // We need to respect the date aspect as we might have subrequests with a different time (e.g. backend preview links) + $dateTimeIdentifier = $this->context->getAspect('date')->get('timestamp'); + $cache = $this->getRuntimeCache(); - $cacheIdentifier = 'PageRepository_hidDelWhere' . ($show_hidden ? 'ShowHidden' : '') . '_' . (int)$this->versioningWorkspaceId . '_' . $frontendUserIdentifier; + $cacheIdentifier = 'PageRepository_hidDelWhere' . ($show_hidden ? 'ShowHidden' : '') . '_' . (int)$this->versioningWorkspaceId . '_' . $frontendUserIdentifier . '_' . $dateTimeIdentifier; $cacheEntry = $cache->get($cacheIdentifier); if ($cacheEntry) { $this->where_hid_del = $cacheEntry;