Bug #89578


Redirect migration wizard creates wrong redirects

Added by Matthias Krappitz over 4 years ago. Updated over 2 years ago.

Should have
Install Tool
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


When updating from TYPO3 8 to 9 and when having domain records with redirects for example for redirecting a subdomain without www to the one with www, the update migration wizard 'Install system extension "redirects" if a sys_domain entry with redirectTo is necessary' creates wrong redirects.

For example if you had a domain record in 8 for domain "" having the redirect target "", the migration wizard creates a redirect with an empty source domain and the source path "/", which is not correct. It should have been source domain "" and source path "/". When correcting this manually after the upgrade wizard, it works fine.

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91780: RedirectsExtensionUpdate Upgrade Wizard parse_url is buggyClosed2020-07-10

Actions #1

Updated by Matthias Krappitz over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Christian Eßl over 4 years ago

  • Category set to Install Tool
Actions #3

Updated by Tobias Schmidt about 4 years ago

This problem still exists in TYPO3 10.4.1. I would consider this a problem with priority Must have. Core migration wizards should be reliable to run as far as possible.

Actions #4

Updated by Stefan Berger about 4 years ago

I could confirm the issue.

The $sourceDetails is generated with parse_url. If the domain is like, it will be extracted as path.

This fix our situation:

diff -r a/typo3/sysext/install/Classes/Updates/RedirectsExtensionUpdate.php b/typo3/sysext/install/Classes/Updates/RedirectsExtensionUpdate.php
>             $sourceDetails['host'] = $domainName;
>             $sourceDetails['path'] = str_replace($domainName, '', $sourceDetails['path']);

Actions #5

Updated by Tobias Schmidt about 4 years ago

To fix this bug change $sourceDetails = parse_url($domainName); to $sourceDetails = parse_url('//' . $domainName); in sysext/install/Classes/Updates/RedirectsExtensionUpdate.php. As the domain name of a domain record must not start with a scheme and/or double slashes the domain name must be prefixed with double slashes in the parse_url call to recognize the domain name as host and not as path. See Example #2 A parse_url() example with missing scheme in PHP documentation.

Actions #6

Updated by Josef Glatz almost 4 years ago

  • Related to Bug #91780: RedirectsExtensionUpdate Upgrade Wizard parse_url is buggy added
Actions #7

Updated by Tobias Schmidt over 2 years ago

Can be closed. Bug is fixed with #91780.

Actions #8

Updated by Riccardo De Contardi over 2 years ago

  • Status changed from New to Closed

I close this issue for now.

If you think that this is the wrong decision or experience the issue again, please reopen it or ping me.



Also available in: Atom PDF