70839[TASK] Generate absolute FAL URLs in frontend
Commit message
Review
-
Code review CR +2 Done
- Helmut Hummel +2
- Jochen Roth +1
- Markus Klein +1
- Benni Mack +1
-
Verified V +2 Done
- Helmut Hummel +2
- Jochen Roth +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 11
- typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php+8 −0
- typo3/sysext/extbase/Classes/Service/ImageService.php3+7 −18
- typo3/sysext/extbase/Tests/Unit/Service/ImageScriptServiceTest.php+2 −2
- typo3/sysext/frontend/Classes/ContentObject/ImageContentObject.php+3 −1
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php+2 −18
- typo3/sysext/frontend/Classes/Http/RequestHandler.php+19 −11
- typo3/sysext/frontend/Classes/Resource/PublicUrlPrefixer.php6new+70 −0
- typo3/sysext/frontend/Classes/Typolink/FileOrFolderLinkBuilder.php+1 −7
- typo3/sysext/frontend/Classes/ServiceProvider.php+5 −1
- typo3/sysext/frontend/Configuration/Services.yaml+3 −0
- typo3/sysext/frontend/Tests/Functional/SiteHandling/TypoLinkGeneratorTest.php+4 −4
Review log 3447
Show 1422 earlier messages
-
Helmut Hummel uploaded patch set 1 08/31/21, 13:35
-
Helmut Hummel uploaded patch set 2 08/31/21, 13:38
-
core-ci voted on patch set 1 V -1 08/31/21, 13:39 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15936
-
Helmut Hummel uploaded patch set 3 08/31/21, 14:32
-
core-ci voted on patch set 3 V -1 08/31/21, 14:52 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15942
-
Helmut Hummel uploaded patch set 4 08/31/21, 15:23
-
core-ci voted on patch set 2 V -1 08/31/21, 15:42 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15937
-
core-ci voted on patch set 4 V +1 08/31/21, 15:54 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15952
-
Helmut Hummel uploaded patch set 5 08/31/21, 16:29
-
core-ci voted on patch set 5 V +1 08/31/21, 16:44 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15958
-
Benni Mack voted on patch set 5 V +1 CR +1 09/02/21, 18:11
-
Benni Mack commented on patch set 5 09/02/21, 18:12
I think this is a good change, I'm not entirely happy about the new static method in PathUtility... feels like this should rather go into HttpUtility? -
Benni Mack uploaded patch set 6 09/03/21, 11:44
-
core-ci voted on patch set 6 V +1 09/03/21, 12:01 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16171
-
Helmut Hummel commented on patch set 6 09/03/21, 12:24
Reply
I thought about this as well. My argument for finally ending up in putting it into PathUtility is the context of where it is used. We have GeneralUtility::isValidUrl (which indeed rather belongs to HttpUtility) to have an in depth check if the input is an URL. IMHO isValidUrl should be used when we can be sure that the input was meant to be an URL (e.g. URL input for a link or website), whereas resemblesUrl should be used for input, that can either be a a path or a fully qualified URL. Hm, now that I'm explaining it, this should rather be named like urlHasProtocolAndScheme, which in fact is what it does, and with that, HttpUtility is the place to go. 😊 -
Helmut Hummel uploaded patch set 7 09/03/21, 14:46
-
core-ci voted on patch set 7 V +1 09/03/21, 15:04 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16197
-
Helmut Hummel uploaded patch set 8 09/06/21, 11:40
-
core-ci voted on patch set 8 V +1 09/06/21, 11:55 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16317
-
Markus Klein commented on patch set 8 09/06/21, 12:38
HttpUtility.php:108That's wrong IMO. '://typo3.org/' would be a TRUE. -
Markus Klein commented on patch set 8 09/06/21, 12:43
ImageService.php:85This is actually not needed at all anymore. We always provide absolute URLs now -
Markus Klein commented on patch set 8 09/06/21, 12:49
PublicUrlPrefixer.php:30can we have a comment please on why this is needed?PublicUrlPrefixer.php:45not sure what the guidelines currently are, but I would prefer to have this somehow as a variable, for proper typehinting and for having TSFE as use-statement in the head
-
Markus Klein voted on patch set 8 CR -1 09/06/21, 12:50
-
Helmut Hummel commented on patch set 8 09/06/21, 12:57
HttpUtility.php:108Replyright. this means all strpos checks that were used previously were wrong as well. but now we have normalized the code that means the same be in exactly one place and in case we need to fix it, we can fix it in one place.ImageService.php:85Replytrue, but kept for BC and kept as it still does prefix with hostname in case absolute is set to truePublicUrlPrefixer.php:30Replyit is there to break the recursive call, but yeah, I'm fine to add a comment why it is neededPublicUrlPrefixer.php:45ReplyI'm fine with that as well. I don't think we have guidelines for that though -
Markus Klein commented on patch set 8 09/06/21, 12:57
I additionally would suggest to add some simple unit tests for the new HTTPUtility method -
Markus Klein commented on patch set 8 09/06/21, 13:01
HttpUtility.php:108ReplySome of them were correct, actually. ;-)ImageService.php:85ReplyJust realized, it's not obsolete. If an image is on a non-local storage, it could still some how matter (but I don't have a concrete example at hand) -
Helmut Hummel uploaded patch set 9 09/06/21, 13:17
-
Helmut Hummel commented on patch set 9 09/06/21, 13:20
HttpUtility.php:108ReplyDon't know what you mean with that. I changed the strpos check to be in a method and replaced the strpos checks with the method. how can some places were correct before and wrong with the moved code? -
core-ci voted on patch set 9 V +1 09/06/21, 13:31 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16322
-
Markus Klein commented on patch set 9 09/06/21, 14:26
HttpUtility.php:108ReplyI meant that some strpos() checks were correct (like typo3/sysext/backend/Classes/Template/ModuleTemplate.php). -
Markus Klein updated the commit message in patch set 10 09/06/21, 14:26
-
core-ci voted on patch set 10 V +1 09/06/21, 14:45 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16330
-
Helmut Hummel commented on patch set 10 09/06/21, 15:15
HttpUtility.php:108Replygot it now, thanks -
Markus Klein rebased onto patch set 11 09/07/21, 19:32
-
Markus Klein uploaded patch set 12 09/07/21, 19:34
-
Markus Klein voted on patch set 12 CR +1 09/07/21, 19:35
-
core-ci voted on patch set 12 V -1 09/07/21, 19:43 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16392
-
Markus Klein uploaded patch set 13 09/07/21, 19:44
-
core-ci voted on patch set 13 V +1 09/07/21, 20:07 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16394
-
core-ci voted on patch set 11 V -1 09/07/21, 21:40 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16390
-
Helmut Hummel commented on patch set 13 09/11/21, 13:24
PublicUrlPrefixer.php:30ReplyDonePublicUrlPrefixer.php:45ReplyDone -
Helmut Hummel voted on patch set 13 V +1 CR +1 09/11/21, 13:25
-
Jochen Roth voted on patch set 13 V +1 CR +1 09/12/21, 16:07
-
Benni Mack voted on patch set 13 V +1 CR +1 09/13/21, 06:35
-
Helmut Hummel voted on patch set 13 V +2 CR +2 09/13/21, 13:53
-
Helmut Hummel merged patch set 14 09/13/21, 13:53
-
Markus Klein voted on patch set 14 CR +1 09/13/21, 13:55