Bug #92326

Redirect URL ignores parameters

Added by Tizian Schmidlin 10 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Start date:
2020-09-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When creating a redirect and setting an additional parameter, it is ignored.

The link generated this way looks something like this:

t3://page?id=31 - - - &L=2

This will only redirect to the page with id 31 but not to the page with id 31 with language with ID 2.

From my understanding, this is a typical typolink and should work as such without anything special to be done.

What does work, therefore proving that redirect to a different language is possible (and even attaching other parameters) is this:

t3://page?id=31&L=2&foo=bar

This will neetly redirect to the page with id 31 with L=2 and parameter foo=bar in the url (even creating a cHash).

Thus it seems that the redirect does either not use typolink or handles it inproperly.

#1

Updated by Guido Schmechel 7 months ago

Do you have activated "keep_query_parameters" for your target? The additionalParams will be only appended if this parameter is "on".

        if (!empty($linkParameterParts['additionalParams']) && $matchedRedirect['keep_query_parameters']) {
            $params = GeneralUtility::explodeUrl2Array($linkParameterParts['additionalParams']);
            foreach ($params as $key => $value) {
                $queryParams[$key] = $value;
            }
        }

Also available in: Atom PDF