Project

General

Profile

Actions

Bug #102162

closed

AbstractMenuContentObject overrides addQueryString with 1

Added by Sascha Ternes about 1 year ago. Updated 5 months ago.

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 #2

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

Actions #3

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

Actions #4

Updated by Patrick Schriner about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF