[BUGFIX] Remove caches if a site is deleted 96/58896/4
authorSteffen Dietrich <steffen_dietrich@gmx.de>
Wed, 14 Nov 2018 12:23:53 +0000 (13:23 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 15 Nov 2018 14:01:19 +0000 (15:01 +0100)
This patch fixes a pseudo-site-error in the backend after a
created site is deleted and the page module is shown.
After deleting the site the cache gets automatically cleared.

Resolves: #85985
Releases: master
Change-Id: I42157fe61a0a624be875d2a777147a657a973d2f
Reviewed-on: https://review.typo3.org/58896
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Steffen Dietrich <Teilzeitphilosoph@gmx.de>
Tested-by: Steffen Dietrich <Teilzeitphilosoph@gmx.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Configuration/SiteConfiguration.php

index 61f5b65..f8a5f62 100644 (file)
@@ -157,6 +157,7 @@ class SiteConfiguration
         $yamlFileContents = Yaml::dump($configuration, 99, 2);
         GeneralUtility::writeFile($fileName, $yamlFileContents);
         $this->getCache()->remove($this->cacheIdentifier);
+        $this->getCache()->remove('pseudo-sites');
     }
 
     /**
@@ -194,6 +195,7 @@ class SiteConfiguration
         }
         @unlink($fileName);
         $this->getCache()->remove($this->cacheIdentifier);
+        $this->getCache()->remove('pseudo-sites');
     }
 
     /**