Review 10.4 Merged

65007[BUGFIX] Better redirects from sys_domain in redirects upgrade wizard

Mohsin Khan CR +2 V +2 Easy +18 −2 updated 10/23/21, 18:16

Commit message

Feeding a sys_domain url to parse_url('example.com/bar')
gives ['path' => 'example.com/bar'], but we need something
like ['host' => 'example.com', 'path' => '/bar']. Adding
a default scheme helps parse_url() to create better
redirects when transitioning from sys_domain to sys_redirects
in RedirectsExtensionUpdate upgrade wizard.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 2534

Show 69 earlier messages
  1. Mohsin Khan uploaded patch set 1 07/10/20, 14:09

  2. TYPO3com voted on patch set 1 V -1 07/10/20, 14:10 Completed build in 24s on Fri, 10 Jul, 02:10 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-77

  3. Mohsin Khan uploaded patch set 2 07/10/20, 14:33

  4. TYPO3com voted on patch set 2 V +1 07/10/20, 14:47 Completed build in 13m 29s on Fri, 10 Jul, 02:47 PM Test Summary: 73886 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-78

  5. Jörg Bösche voted on patch set 2 CR +1 08/21/20, 07:56

  6. Guido Schmechel commented on patch set 2 08/21/20, 09:25

    RedirectsExtensionUpdate.php:235

    Really important ;-) domian > domain with out > without
  7. Simon Gilli commented on patch set 2 CR -1 08/22/20, 10:14

    RedirectsExtensionUpdate.php:245

    Nowadays the default should be https, isn't it? And IIRC there are also some system settings to select the protocol which perhaps should also be takken into account here...
  8. Mohsin Khan uploaded patch set 3 08/29/20, 13:08

  9. TYPO3com voted on patch set 3 V +1 08/29/20, 13:19 Completed build in 11m 12s on Sat, 29 Aug, 01:19 PM Test Summary: 74061 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-291

  1. Oliver Klee commented on patch set 3 08/29/20, 14:48

    previously -> Previously,
    them -> them,
    We should have master first here, and then cherry-pick to 10.4. and 9.5 after master has been merged (unless master is not affected).
  2. Oliver Klee commented on patch set 3 CR -1 08/29/20, 18:25

    -1 until we have resolved whether this also affects master.
  3. Mohsin Khan updated the commit message in patch set 4 09/03/20, 15:43

  4. TYPO3com voted on patch set 4 V -1 09/03/20, 16:01 Completed build in 17m 00s on Thu, 3 Sep, 04:01 PM Test Summary: 1 of 74637 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-313

  5. Oliver Klee wrote 09/04/20, 07:43

    Removed reviewer Oliver Klee.
  6. Christian Kuhn commented on patch set 4 10/20/21, 02:02

    Reply

    Done

    Reply

    Done

    Reply

    v10 only - the upgrade wizard has been dropped in v11.

    RedirectsExtensionUpdate.php:235 Reply

    Done

    RedirectsExtensionUpdate.php:245 Reply

    Done
  7. Christian Kuhn rebased onto patch set 5 10/20/21, 02:02

  8. core-ci voted on patch set 5 V +1 10/20/21, 02:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18366

  9. Christian Kuhn commented on patch set 5 10/20/21, 02:23

    Hey. Thanks for the patch and sorry for late response. How to continue here? I still don't fully understand this change. I played around with parse_url(), but it does not seem to mix up the domain part within path. Script I played with: https://3v4l.org/dMlMJ The patch reads logical, but I can't reproduce currently. This wizard is not included in v11 anymore, so only a bug fix for v10 old-stable is possible. I'm unsure how critical the fix is and if we should still include it?
  10. Tobias Schmidt commented on patch set 5 CR +1 10/20/21, 12:30

    Reply

    parse_url($domainName) returns a wrong array if the domain name in field domainName in table sys_domain is just the plain domain name without a scheme. For example parse_url('example.com') returns an array like ["path" => "example.com"]. One would expect an array like ["host" => "example.com"]. This leads to wrong redirect records with an empty source domain and a wrong source path. To make parse_url work at least two slashes as a prefix are required: parse_url('//example.com'). See: https://www.php.net/manual/en/function.parse-url.php#example-3845 I consider this fix critical because it fixes a broken core upgrade wizard. Please include it in TYPO3 10.
  11. Benni Mack updated the commit message in patch set 6 10/21/21, 10:14

  12. core-ci voted on patch set 6 V +1 10/21/21, 10:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18395

  13. Tobias Schmidt updated the commit message in patch set 7 10/22/21, 08:18

  14. core-ci voted on patch set 7 V +1 10/22/21, 08:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18417

  15. Stefan Bürk commented on patch set 7 CR +1 10/23/21, 13:49

    Reply

    Tobias is right. Christian see updated example: https://3v4l.org/UOpRS
  16. Guido Schmechel voted on patch set 7 CR +1 10/23/21, 16:49

  17. Christian Kuhn uploaded patch set 8 10/23/21, 17:45

  18. Christian Kuhn voted on patch set 8 V +1 CR +1 10/23/21, 17:46

  19. Stefan Bürk commented on patch set 9 10/23/21, 17:47

    Published edit on patch set 8.
  20. Stefan Bürk voted on patch set 9 V +1 CR +1 10/23/21, 17:48

  21. core-ci voted on patch set 8 V +1 10/23/21, 17:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18453

  22. core-ci voted on patch set 9 V +1 10/23/21, 17:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18454

  23. Christian Kuhn voted on patch set 9 V +2 CR +2 10/23/21, 18:15

  24. Christian Kuhn merged patch set 10 10/23/21, 18:16

  25. Christian Kuhn commented on patch set 10 10/23/21, 18:16

    Reply

    Done