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

Updated by Gerrit Code Review over 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61509

Actions #2

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61509

Actions #3

Updated by Guido Schmechel over 5 years ago

Hi Manfred,

thanks for your findings. I add your patch with a test to the review system. Feel free to optimize.

Actions #4

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61509

Actions #5

Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61509

Actions #6

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62055

Actions #7

Updated by Guido Schmechel about 5 years ago

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

Updated by Gerrit Code Review about 5 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62055

Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62055

Actions #10

Updated by Guido Schmechel about 5 years ago

  • Status changed from Under Review to Resolved
Actions #11

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF