Actions
Bug #102162
closedAbstractMenuContentObject overrides addQueryString with 1
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2023-10-13
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:
Description
In TYPO3 12, "addQueryString" config parameter has been extended: It can now be set to "untrusted" to keep all query params. (Value "1" would remove all query params that are not defined in a route enhancer.)
In TS configuration for LanguageMenuProcessor I can use the new value to enable keeping all query parameters:
dataProcessing.10 = language-menu dataProcessing.10 { languages = auto as = languageNavigation addQueryString = untrusted }
Unfortunately, the "untrusted" value gets overridden when AbstractMenuContentObject::menuTypoLink(…) is called later. See line 1645 ff:
if ($page['_ADD_GETVARS'] ?? false) { $conf['addQueryString'] = 1; $conf['addQueryString.'] = $this->conf['addQueryString.'] ?? []; }
('_ADD_GETVARS'
is set to $this->conf['addQueryString'] ?? false
in line 616.)
I suppose to change line 1645 ff to:
if ($page['_ADD_GETVARS'] ?? false) { $conf['addQueryString'] = $page['_ADD_GETVARS']; $conf['addQueryString.'] = $this->conf['addQueryString.'] ?? []; }
Files
Actions