Review main Merged

62128[BUGFIX] Allow redirects to specific records

Benni Mack CR +2 V +2 Easy +12 −0 updated 10/31/19, 05:13

Commit message

Creating links to specific records (LinkHandler functionality) does require
a global TSFE object. In addition, calling LinkBuilder directly will
result in a fatal error when linking e.g. to EXT:news records.

Currently, this is not possible as the RedirectService is not prepared for this.

The patch modifies the places accordingly.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Oli Bartsch +1
    • Georg Ringer +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Oli Bartsch +1
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 1013

  1. Benni Mack uploaded patch set 1 10/28/19, 15:19

  2. TYPO3com voted on patch set 1 V +1 10/28/19, 15:28 Completed build in 09m 36s on Mon, 28 Oct, 03:28 PM Test Summary: 48067 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37822

  3. Benni Mack uploaded patch set 2 10/28/19, 15:33

  4. TYPO3com voted on patch set 2 V -1 10/28/19, 15:43 Completed build in 09m 33s on Mon, 28 Oct, 03:43 PM Test Summary: 47829 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37823

  5. TYPO3com voted on patch set 2 V +1 10/28/19, 15:48 Completed build in 24m 31s on Mon, 28 Oct, 03:48 PM Test Summary: 48067 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-37823

  6. Oli Bartsch commented on patch set 2 V +1 CR +1 10/28/19, 16:00

    Patch looks good and works for me. I have just one nitpick suggestion.

    RedirectService.php:260

    As `lastTypoLinkUrl` is defined as string we could also use "type safe comparison" `$url !== ''`
  7. Benni Mack commented on patch set 2 10/30/19, 08:23

    RedirectService.php:260 Reply

    This would mean that we assume that no one (no third party extension) would ever write something else than a string in there? I think we could do this with PHP 7.4, but currently, this "public API" could be misused for anything unfortunately.
  8. Daniel Goerz voted on patch set 2 V +1 10/30/19, 10:10

  9. Daniel Goerz commented on patch set 2 10/30/19, 10:11

    RedirectService.php:259 Unresolved

    Because this is already very hacky, we could check for the matching exception code just to be sure.
  10. Georg Ringer voted on patch set 2 V +1 CR +1 10/30/19, 10:54

  11. Daniel Goerz voted on patch set 2 V +2 CR +2 10/30/19, 12:02

  12. Daniel Goerz merged patch set 3 10/30/19, 12:02

  13. Oli Bartsch commented on patch set 3 10/31/19, 05:13

    RedirectService.php:260 Reply Unresolved

    All right. Than I‘m fine.