Bug #102162
closedAbstractMenuContentObject overrides addQueryString with 1
100%
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
Updated by Sascha Ternes about 1 year ago
supposed patch
Updated by Gerrit Code Review about 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81424
Updated by Gerrit Code Review about 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/81351
Updated by Patrick Schriner about 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8bde18dbb5fa551978e1309d5c770c9ef74811bb.