Project

General

Profile

Actions

Bug #88963

closed

RedirectService is not taking additional parameters

Added by Manfred Mirsch over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Start date:
2019-08-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

When using additinal parameters in typolink as link target these parameters are not appended in redirect.

E.g. my link target as typolink is:
t3://page?uid=2 - - - q=support

When I add this as link target in redirect entry, I can see the correct link generated in Redirects backend module in column "destination".

But klicking the preview or entering the source_url, the additional parameter "q=support" is not used.

I found the problem in \TYPO3\CMS\Redirects\Service\RedirectService::getTargetUrl().

Because the source_path itself has no query parameters, they are not commited when this method is called at:
TYPO3\CMS\Redirects\Http\Middleware\RedirectHandler::process()
#60 $url = $redirectService->getTargetUrl($matchedRedirect, $request->getQueryParams(), $request->getAttribute('site', null));

I found a solution for fixing this problem by adding additional parameters from target typolink which I add.

Greetings,
Manfred MIrsch


Files

RedirectService.patch (1.01 KB) RedirectService.patch Manfred Mirsch, 2019-08-15 20:19
Actions

Also available in: Atom PDF