diff --git a/Classes/Hook/DatamapHook.php b/Classes/Hook/DatamapHook.php index 1c0c85884c5..3e0d1f1bd80 100644 --- a/Classes/Hook/DatamapHook.php +++ b/Classes/Hook/DatamapHook.php @@ -23,7 +23,10 @@ class DatamapHook extends AbstractHook */ public function processDatamap_afterDatabaseOperations($status, $table, $id, $fieldArray, DataHandler $dataHandler): void { - if ('pages' !== $table || !MathUtility::canBeInterpretedAsInteger($id)) { + if ('pages' !== $table) { + return; + } + if (!MathUtility::canBeInterpretedAsInteger($id)) { return; } @@ -31,7 +34,7 @@ public function processDatamap_afterDatabaseOperations($status, $table, $id, $fi $allowSfc = (bool) $row['tx_staticfilecache_cache']; if (!$allowSfc) { try { - // Delete cache + // Delete right now!! do not wait until queue is deleting this $configuration = GeneralUtility::makeInstance(ConfigurationService::class); $configuration->override('boostMode', '0'); $cacheService = GeneralUtility::makeInstance(CacheService::class); diff --git a/Classes/Service/CookieService.php b/Classes/Service/CookieService.php index b546258e574..bcf88c30800 100644 --- a/Classes/Service/CookieService.php +++ b/Classes/Service/CookieService.php @@ -28,7 +28,10 @@ public function __construct(private DateTimeService $dateTimeService) */ public function setCookie(int $lifetime): void { - setcookie(self::FE_COOKIE_NAME, 'typo_user_logged_in', $lifetime + $this->dateTimeService->getCurrentTime(), '/', $this->getCookieDomain(), GeneralUtility::getIndpEnv('TYPO3_SSL')); + if ($lifetime !== self::SESSION_LIFETIME) { + $lifetime += $this->dateTimeService->getCurrentTime(); + } + setcookie(self::FE_COOKIE_NAME, 'typo_user_logged_in', $lifetime, '/', $this->getCookieDomain(), GeneralUtility::getIndpEnv('TYPO3_SSL')); } /** @@ -36,7 +39,7 @@ public function setCookie(int $lifetime): void */ public function unsetCookie(): void { - $this->setCookie( -3600); + $this->setCookie(-3600); } public function hasCookie(): bool