[BUGFIX] Prevent exception due to missing id in the language menu
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / Menu / AbstractMenuContentObject.php
index 67fbacc..6a929de 100644 (file)
@@ -1170,6 +1170,9 @@ abstract class AbstractMenuContentObject
     {
         $parameters = GeneralUtility::explodeUrl2Array($queryString);
         if (!empty($parameters)) {
+            if (!isset($parameters['id'])) {
+                $queryString .= '&id=' . $this->getTypoScriptFrontendController()->id;
+            }
             /** @var CacheHashCalculator $cacheHashCalculator */
             $cacheHashCalculator = GeneralUtility::makeInstance(CacheHashCalculator::class);
             $cHashParameters = $cacheHashCalculator->getRelevantParameters($queryString);