Review main Merged

64327[BUGFIX] Avoid accessing FAL compatibility layer

Helmut Hummel CR +2 V +2 Normal +133 −79 updated 11/03/21, 21:04

Commit message

When accessing static files via FAL API,
the compatibility layer (storage 0) kicks in.
This compatibility layer has multiple downsides. One of
them are unreliable updates when the file changes.
This should be avoided to be used especially by core code.

Also remove the code that only was added to allow
f:image usage with URLs soley to allow mixed usage
of this VH not only for FAL assets but also URLs
and static resources through FAL compat layer.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Jochen Roth +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • core-ci +1 CI

Issues 1

Files 6

Review log 3749

Show 1724 earlier messages
  1. Helmut Hummel uploaded patch set 1 04/27/20, 21:22

  2. TYPO3com voted on patch set 1 V +1 04/27/20, 21:41 Completed build in 18m 22s on Mon, 27 Apr, 09:41 PM Test Summary: 73657 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3068

  3. Benjamin Franzke commented on patch set 1 04/27/20, 21:45

    Should the workarounds that have been added to the ImageViewHelper then be reverted (well or rather be deprecated?) again? I refer to this change: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63635 Even https://review.typo3.org/c/Packages/TYPO3.CMS/+/64236 could be reverted, on the other hand someone may register a custom SystemEmail Layout via LocalConfiguration.php and use <f:image> in that own mail layout… Also https://review.typo3.org/c/Packages/TYPO3.CMS/+/64205 looks like overkill once we have this change merged (that doesn't mean I don't like this patch, I think it's good to reduce the usage of complicated services in FluidEmail SystemLayout as it used for failsafe install tool stuff: login notification, mail check…) I'm really a bit puzzled how to proceed with FluidEmail. I somehow think we should limit FluidEmail in installtool context to installtool provided Templates/Layout *only*. But I guess people want templates for their installtool login notification and email tests…

    SystemEmail.html:346

    TYPO3_SITE_PATH is prepended to PathUtility::getAbsoluteWebPath – therefore a concatenation with normalizedParams.siteUrl will cause duplicate SITE_PATHs to be used. This will create double slashes for (the most common) installations in '/', but let's say TYPO3 is installed to /mysite, this will create a link like: https://mydomain.tld/mysite/mysite/typo3/sysext/backend/… Oh, well, I just figured the code was copied from the next <f:else> block which is already broken as well – it contains the same mistake ¯\_(ツ)_/¯
  4. Benjamin Franzke commented on patch set 1 04/27/20, 23:19

    SystemEmail.html:346 Reply

    Ah sorry, forget about that remark. I thought the new normalizedUrl viewhelper was used here, but actually f:uri.resource is used. Still, I wonder why this doesn't use the absolute: 1 parameter for f:uri.resource – but I think I need to ask Benni who added that code with the very first patchset for FluidEmail in https://review.typo3.org/c/Packages/TYPO3.CMS/+/62362/1
  5. Josef Glatz commented on patch set 1 04/28/20, 04:52

    compatibility
    This compat layer has multiple downsides. One of them are unreliable updates when the file changes. This should be avoided to be used especially by core code. > Better?
  6. Helmut Hummel commented on patch set 1 04/28/20, 10:41

    > Should the workarounds that have been added to the ImageViewHelper then be reverted (well or rather be deprecated?) again? The thing is: Passing a full URL to the ImageViewHelper does not make much sense, as one could simply use a simple img tag. Besides that, this "fix" does take care of handling URLs, but does not avoid storage 0 to be used. So the changes here still make sense. In a broader sense, we should deprecate storage 0 altogether and remove it in v12 to avoid further hassle with it (not part of this change of course though)
  7. Helmut Hummel commented on patch set 1 04/28/20, 10:45

    SystemEmail.html:346 Reply

    Not 100% sure, though I think that ControllerContext is not properly set when rendering the template (as it only gets set properly for Extbase Plugins)
  8. Josef Glatz updated the commit message in patch set 2 04/28/20, 10:55

  9. TYPO3com voted on patch set 2 V -1 04/28/20, 11:07 Completed build in 11m 59s on Tue, 28 Apr, 11:07 AM Test Summary: 2 of 74148 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3095

  10. Helmut Hummel commented on patch set 2 05/01/20, 22:13

    Reply

    Ack

    Reply

    Ack
  11. Helmut Hummel commented on patch set 3 05/01/20, 22:28

    Published edit on patch set 2.
  12. Helmut Hummel commented on patch set 3 05/01/20, 22:35

  13. TYPO3com commented on patch set 2 05/01/20, 22:36 Completed build in 11m 45s on Fri, 1 May, 10:36 PM Test Summary: 1 of 74147 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3155

  14. TYPO3com voted on patch set 3 V +1 05/01/20, 22:42 Completed build in 13m 51s on Fri, 1 May, 10:42 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3156

  15. Benjamin Franzke commented on patch set 3 V -1 CR -1 05/08/20, 18:19

    SystemEmail.html:343

    This does not work, NormalizedUrlViewHelper currently doesn't fall back to the renderChildrenClosure when pathOrUrl is not specified as argument. Will change.
  16. Benjamin Franzke uploaded patch set 4 05/08/20, 18:26

  17. Benjamin Franzke commented on patch set 4 V -1 05/08/20, 18:30

    NormalizedUrlViewHelper.php:72

    This is not yet working for me in install tool, it returns an absolute path without domain, starting with / instead of http(s):// normalizedParams.siteUrl in SystemEmail.html is calculated correctly (contains the domain) but PathUtility uses GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') which returns "/" when executed in installtool in my case.

    SystemEmail.html:343 Reply

    Done
  18. TYPO3com voted on patch set 4 V +1 05/08/20, 18:37 Completed build in 11m 24s on Fri, 8 May, 06:37 PM Test Summary: 73694 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3274

  19. Benjamin Franzke uploaded patch set 5 1 comment 05/08/20, 19:02

  20. TYPO3com voted on patch set 5 V -1 05/08/20, 19:03 Completed build in 23s on Fri, 8 May, 07:03 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3276

  21. Benjamin Franzke uploaded patch set 6 05/08/20, 19:03

  22. TYPO3com voted on patch set 6 V +1 05/08/20, 19:16 Completed build in 12m 11s on Fri, 8 May, 07:16 PM Test Summary: 73696 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3277

  23. Benni Mack updated the commit message in patch set 7 05/25/20, 18:50

  24. Benni Mack rebased onto patch set 8 09/10/20, 19:53

  1. TYPO3com voted on patch set 8 V +1 09/10/20, 20:09 Completed build in 14m 48s on Thu, 10 Sep, 08:09 PM Test Summary: 73173 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5520

  2. Jörg Bösche voted on patch set 8 CR +1 09/11/20, 06:30

  3. Georg Ringer commented on patch set 8 09/17/20, 19:08

    NormalizedUrlViewHelper.php:1

    declare_strict missing

    NormalizedUrlViewHelper.php:77

    so how to deal with that?
  4. Helmut Hummel abandoned the change 03/17/21, 17:27

  5. Helmut Hummel restored the change 10/09/21, 08:12

  6. Helmut Hummel uploaded patch set 9 10/09/21, 09:26

  7. Helmut Hummel uploaded patch set 10 10/09/21, 09:27

  8. Helmut Hummel commented on patch set 10 10/09/21, 09:27

    NormalizedUrlViewHelper.php:1 Reply

    Done

    NormalizedUrlViewHelper.php:77 Reply

    Done
  9. core-ci voted on patch set 9 V -1 10/09/21, 09:30 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17861

  10. Helmut Hummel voted on patch set 10 CR -2 10/09/21, 10:10

  11. Oliver Klee commented on patch set 10 CR -1 10/09/21, 10:56

    StorageRepository.php:353

    The code after throwing the exception now is never reached and needs to be removed.
  12. core-ci voted on patch set 10 V -1 10/09/21, 11:30 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17862

  13. Helmut Hummel uploaded patch set 11 10/09/21, 12:51

  14. core-ci voted on patch set 11 V +1 10/09/21, 13:06 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17869

  15. Oliver Klee wrote 10/09/21, 13:22

    Removed reviewer Oliver Klee.
  16. Helmut Hummel wrote 10/11/21, 08:19

    Removed cc Josef Glatz.
  17. Helmut Hummel wrote 10/11/21, 08:19

    Removed reviewer Jörg Bösche.
  18. Helmut Hummel wrote 10/11/21, 08:19

    Removed cc Georg Ringer.
  19. Benni Mack updated the commit message in patch set 12 10/11/21, 09:15

  20. core-ci voted on patch set 12 V +1 10/11/21, 09:32 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17906

  21. Helmut Hummel voted on patch set 12 CR 0 10/11/21, 18:53

  22. Helmut Hummel commented on patch set 12 10/15/21, 13:00

    StorageRepository.php:353 Reply

    Done
  23. Jochen Roth voted on patch set 12 V +1 CR +1 11/03/21, 16:44

  24. Benni Mack voted on patch set 12 V +2 CR +2 11/03/21, 21:04

  25. Benni Mack merged patch set 13 11/03/21, 21:04