Review main Abandoned

61351[FEATURE] Add static route type for assets of sitepackage extensions

Daniel Windloff CR 0 V 0 Normal +102 −8 updated 03/23/20, 14:55

Commit message

A new static route type file for assets of extensions has been added.
It could be used to reference favicons or touchicons, that are in a
sitepackage extension.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 4

Review log 1316

  1. Daniel Windloff uploaded patch set 1 07/25/19, 08:32

  2. TYPO3com voted on patch set 1 V +1 07/25/19, 08:43 Completed build in 11m 10s on Thu, 25 Jul, 10:43 AM Test Summary: 47160 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35315

  3. Guido Schmechel commented on patch set 1 07/25/19, 09:40

    Samll typo in commit message. "sitepackage"
  4. Daniel Windloff uploaded patch set 2 07/25/19, 09:48

  5. Daniel Windloff commented on patch set 2 07/25/19, 09:50

    > Patch Set 1: > > Samll typo in commit message. "sitepackage" Done (also in changelog file)
  6. TYPO3com voted on patch set 2 V +1 07/25/19, 09:58 Completed build in 10m 15s on Thu, 25 Jul, 11:58 AM Test Summary: 47160 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35318

  7. Georg Ringer commented on patch set 2 CR -1 07/25/19, 11:12

    StaticRouteResolver.php:135

    please use \TYPO3\CMS\Core\Type\File\FileInfo::getMimeType

    StaticRouteResolver.php:150

    i would invert the check and then throw the exception. please also add the filename to the exception
  8. Daniel Windloff uploaded patch set 3 07/25/19, 13:53

  9. Daniel Windloff commented on patch set 3 07/25/19, 13:55

    StaticRouteResolver.php:135 Reply

    Done

    StaticRouteResolver.php:150 Reply

    Done
  10. TYPO3com voted on patch set 3 V +1 07/25/19, 14:04 Completed build in 11m 38s on Thu, 25 Jul, 04:04 PM Test Summary: 47160 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35325

  11. Guido Schmechel commented on patch set 3 07/26/19, 13:30

    If the file does not exist, it will become a 500 error. Is this correct for SEO reasons? I would expect a 404 here, even if the error is only temporary. In addition an error message for the log.
  12. Daniel Windloff commented on patch set 3 07/29/19, 06:52

    > Patch Set 3: > > If the file does not exist, it will become a 500 error. Is this correct for SEO reasons? > > I would expect a 404 here, even if the error is only temporary. In addition an error message for the log. I'm not the seo expert, so I do not know what is the best solution regarding seo. I thought the exception would be a proper error handling, as the referenced files should be in one extension folder and not uploaded by editors.
  13. Tymoteusz Motylewski commented on patch set 3 07/30/19, 09:44

    hmm, I'm not the fan of returning public static files through php. Please also consider that these files should have correct cache headers (e.g. expires)
  14. Tymoteusz Motylewski voted on patch set 3 CR -1 08/02/19, 05:22

  15. Frank Nägler commented on patch set 3 01/16/20, 13:14

    > hmm, I'm not the fan of returning public static files through PHP. I agree, and I guess the example in the RST is not perfect. I see a valid use case for some special cases like static JSON files which moved into an extension because it is the best practice. Or maybe other static content, which should be or was available in root since ever and is now available in the extension. An image is INHO no good example. > Please also consider that these files should have correct cache headers (e.g. expires) In this area, I think the response should contain the correct mime type header, but expire settings and cache header especially for static content should be the responsibility of the webserver. for example an apache config: <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" ExpiresByType text/css "access plus 1 year" ExpiresByType application/json "access plus 0 seconds" ... </IfMofule> If we send the correct mime-type, the webserver should be able to handle the rest.
  16. Benni Mack abandoned the change 03/23/20, 14:55

    no movement, abandoning for the time being