Review main Merged

64345[BUGFIX] Allow LocalDriver baseUri to be set to any value

Helmut Hummel CR +2 V +2 Normal +123 −5 updated 10/06/20, 09:11

Commit message

LocalDriver evaluates a configuration option baseUri,
to use this URI instead of a derived one from the absolute
base path of files.

However there are currently limitations that need to be fixed
to allow more complex setups:

1. baseUri is not defined in flexform, thus cannot be set from UI
2. baseUri isn't evaluated, when the absolute file path
   is within TYPO3's public path
3. baseUri is currently required to be a fully qualified URI (with scheme and host)

This change addresses all three of them to cover the following use cases:

1. Provide a different hostname to serve the files from, even
   when they are located on the same machine.
2. Allow base URI without host name, for files that are on the same host,
   but in a folder not within TYPO3's root directory (e.g. due to special
   web server configuration)

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Markus Klein +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Markus Klein +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 3956

Show 2031 earlier messages
  1. Helmut Hummel uploaded patch set 1 04/29/20, 10:30

  2. TYPO3com voted on patch set 1 V -1 04/29/20, 10:42 Completed build in 11m 56s on Wed, 29 Apr, 10:42 AM Test Summary: 73353 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3105

  3. TYPO3com voted on patch set 1 V +1 04/29/20, 11:59 Completed build in 1h 40m 25s on Wed, 29 Apr, 11:59 AM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3105

  4. Helmut Hummel rebased onto patch set 2 04/29/20, 21:00

  5. TYPO3com voted on patch set 2 V +1 04/29/20, 21:19 Completed build in 19m 16s on Wed, 29 Apr, 09:19 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3109

  6. Benni Mack voted on patch set 2 CR +1 05/05/20, 21:37

  7. Benni Mack voted on patch set 2 V +1 05/06/20, 06:31

  8. Daniel Goerz commented on patch set 2 05/07/20, 07:21

    locallang_mod_file.xlf:25

    From reading the code I dont understand how setting this prevents any calculation?
  9. Helmut Hummel commented on patch set 2 05/11/20, 20:36

    locallang_mod_file.xlf:25 Reply

    Maybe calculating is worng. What I mean is deriving the base URI from the absolute path of the file storage in this code: https://github.com/TYPO3/TYPO3.CMS/blob/ba457e83585b3d7690255520350d1158772354c9/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php#L135-L141
  10. Helmut Hummel uploaded patch set 3 05/11/20, 20:41

  11. Helmut Hummel commented on patch set 3 05/11/20, 20:42

    locallang_mod_file.xlf:25 Reply Unresolved

    Now it is "If set, the given URI is used as base URI for files in this storage, instead of deriving the URI from the base path" better?
  12. TYPO3com voted on patch set 3 V -1 05/11/20, 20:58 Completed build in 17m 01s on Mon, 11 May, 08:58 PM Test Summary: 1 of 74190 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3318

  13. Helmut Hummel commented on patch set 3 CR -2 05/12/20, 13:01

    Needs indeed some more thoughts
  14. Helmut Hummel uploaded patch set 4 05/12/20, 13:25

  15. TYPO3com voted on patch set 4 V +1 05/12/20, 13:39 Completed build in 14m 28s on Tue, 12 May, 01:39 PM Test Summary: 73708 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3338

  16. Helmut Hummel uploaded patch set 5 05/12/20, 20:47

  17. Helmut Hummel commented on patch set 5 CR 0 05/12/20, 20:48

    This change is ready for review.
  18. TYPO3com voted on patch set 5 V -1 05/12/20, 20:48 Completed build in 22s on Tue, 12 May, 08:48 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3348

  19. Daniel Goerz uploaded patch set 6 05/12/20, 21:01

  20. Helmut Hummel uploaded patch set 7 05/12/20, 21:01

  21. Helmut Hummel uploaded patch set 8 05/12/20, 21:02

  22. TYPO3com voted on patch set 6 V +1 05/12/20, 21:26 Completed build in 18m 53s on Tue, 12 May, 09:26 PM Test Summary: 73750 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3351

  23. TYPO3com voted on patch set 7 V -1 05/12/20, 21:34 Completed build in 26m 04s on Tue, 12 May, 09:34 PM Test Summary: 3 of 74235 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3352

  24. TYPO3com voted on patch set 8 V +1 05/12/20, 21:41 Completed build in 33m 29s on Tue, 12 May, 09:41 PM Test Summary: 73750 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3353

  25. Daniel Goerz commented on patch set 8 CR +1 05/12/20, 21:44

    LocalDriver.php:136 Unresolved

    This looks good now, although I am not sure about possible side effects this might cause. But If I understand it correctly it was not possible to set this prior to the patch at all, so we should be fine?
  26. Benni Mack updated the commit message in patch set 9 05/25/20, 18:51

  27. Daniel Goerz rebased onto patch set 10 05/30/20, 11:53

  28. Daniel Goerz voted on patch set 10 CR +1 05/30/20, 11:53

  29. TYPO3com voted on patch set 10 V -1 05/30/20, 12:06 Completed build in 12m 26s on Sat, 30 May, 12:06 PM Test Summary: 1 of 73563 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3694

  30. TYPO3com voted on patch set 10 V +1 05/30/20, 12:13 Completed build in 32m 02s on Sat, 30 May, 12:13 PM Test Summary: 73076 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3694

  31. Anja Leichsenring commented on patch set 10 07/06/20, 12:23

    not sure what I do wrong, but I can't get it to work. My setup is a classic checkout of master with introduction package. I put the baseUri 'assets/' into the newly created field of the fileadmin storage that is already defined. When I force reload the FE, all paths to images have been adjusted (fileadmin -> assets), but the images are not displayed anymore due to 404 Not Found. So how is this supposed to work? Please give some advice for proper testing.
  1. Helmut Hummel uploaded patch set 11 08/27/20, 13:33

  2. Helmut Hummel commented on patch set 11 08/27/20, 13:33

    rebased
  3. TYPO3com voted on patch set 11 V -1 08/27/20, 13:45 Completed build in 11m 39s on Thu, 27 Aug, 01:45 PM Test Summary: 73133 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5014

  4. Benni Mack rebased onto patch set 12 09/04/20, 12:11

  5. Benni Mack commented on patch set 12 09/04/20, 12:12

    @helhum OK to only have that in master + 10.4?
  6. TYPO3com voted on patch set 12 V +1 09/04/20, 12:29 Completed build in 17m 09s on Fri, 4 Sep, 12:29 PM Test Summary: 73242 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5238

  7. Helmut Hummel updated the commit message in patch set 13 09/24/20, 12:10

  8. Helmut Hummel commented on patch set 13 09/24/20, 12:10

    > Patch Set 12: > > @helhum OK to only have that in master + 10.4? Yes, of course. Changed the commit message accordingly
  9. Helmut Hummel commented on patch set 13 09/24/20, 12:13

    > Patch Set 10: > So how is this supposed to work? Please give some advice for proper testing. You of course need to ensure, that the web server is able to deliver the files with the given base URI. This new configuration option disables auto detection of the base URI and giving control to users when required (e.g. images are deliverd via CDN)
  10. TYPO3com voted on patch set 13 V +1 09/24/20, 12:26 Completed build in 15m 02s on Thu, 24 Sep, 12:26 PM Test Summary: 73747 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5914

  11. Benni Mack voted on patch set 13 CR +1 09/25/20, 15:26

  12. Markus Klein updated the commit message in patch set 14 09/28/20, 12:28

  13. Markus Klein commented on patch set 14 09/28/20, 12:31

    locallang_mod_file.xlf:22

    maybe mention "Base URI where files actually stored"
  14. TYPO3com voted on patch set 14 V +1 09/28/20, 12:40 Completed build in 11m 44s on Mon, 28 Sep, 12:40 PM Test Summary: 73747 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6038

  15. Helmut Hummel commented on patch set 14 09/28/20, 15:56

    locallang_mod_file.xlf:22 Reply Unresolved

    Feel free to improve the sentence below, where I tried to communicate exactly this.
  16. Markus Klein commented on patch set 14 CR -1 09/28/20, 21:20

    locallang_mod_file.xlf:24 Unresolved

    Forget my comment above, the bug is the wrong name here, which misled me.
  17. Markus Klein commented on patch set 15 09/28/20, 21:21

    Published edit on patch set 14.
  18. Markus Klein commented on patch set 16 09/28/20, 21:22

    Published edit on patch set 15.
  19. Markus Klein voted on patch set 16 CR +1 09/28/20, 21:22

  20. TYPO3com voted on patch set 15 V +1 09/28/20, 21:47 Completed build in 22m 48s on Mon, 28 Sep, 09:47 PM Test Summary: 73747 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6051

  21. TYPO3com voted on patch set 16 V +1 09/28/20, 21:56 Completed build in 31m 00s on Mon, 28 Sep, 09:56 PM Test Summary: 73747 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6052

  22. Markus Klein voted on patch set 16 V +1 10/06/20, 07:55

  23. Georg Ringer voted on patch set 16 V +1 CR +1 10/06/20, 08:35

  24. Georg Ringer voted on patch set 16 V +2 CR +2 10/06/20, 09:11

  25. Georg Ringer merged patch set 17 10/06/20, 09:11