Issue Bug Closed

#78071Language menu TypoScript configurations throws exception if cHashIncludePageId is set

Thorsten Lübkemann 09/27/16, 10:24 updated 09/27/16, 11:05

Description

In TYPO3 6.2.27 with cHashIncludePageId set to true adding any parameter to lib.langMenu.addQueryString.exclude will throw an exception on some pages.

If I set [FE][cHashIncludePageId] in TYPO3 6.2.27 and use the language menu with:

lib.langMenu = HMENU
lib.langMenu.addQueryString = 1
lib.langMenu.addQueryString.exclude = L,cHash

and the URL contains a parameter which isn’t excluded from the cache hash generation (like a parameter from an Extbase extension)

then

typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php on line 415 will call the method getQueryArguments() of typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer. On line 6544 of that file the ‘id’ gets added to the $exclude array.

After that the AbstractMenuContentObject calls the method analyzeCacheHashRequirements() in line 416, which calls the method getRelevantParameters() of typo3/sysext/frontend/Classes/page/CacheHashCalculator.php. This method throws an exception on line 128 because the ‘id’ parameter isn’t set anymore.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.