86664[BUGFIX] Cast tag-content of several ViewHelpers to string
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Simon Praetorius +1
- Christian Kuhn +1
-
Verified V +2 Done
- Garvin Hicking +2
- Simon Praetorius +1
- core-ci +1 CI
Issues 1
Files 40
- typo3/sysext/backend/Classes/ViewHelpers/Link/EditRecordViewHelper.php+1 −1
- typo3/sysext/backend/Classes/ViewHelpers/Link/NewRecordViewHelper.php+1 −1
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Link/EditRecordViewHelperTest.php+15 −0
- typo3/sysext/backend/Tests/Functional/ViewHelpers/Link/NewRecordViewHelperTest.php+14 −0
- typo3/sysext/dashboard/Classes/ViewHelpers/Widget/ButtonViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Be/InfoboxViewHelper.php3+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Form/ButtonViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Link/EmailViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Link/FileViewHelper.php+2 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php+3 −3
- typo3/sysext/fluid/Tests/Functional/Fixtures/ViewHelpers/Link/FileViewHelper/Template.html+2 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Asset/CssViewHelperTest.php+12 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Asset/ScriptViewHelperTest.php+12 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Be/InfoboxViewHelperTest.phpnew+44 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Be/LinkViewHelperTest.php+20 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/Select/OptionViewHelperTest.php+2 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/ButtonViewHelperTest.php+8 −0
Show 20 more files
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/SelectViewHelperTest.php+102 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/BytesViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/CropViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/CurrencyViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/DateViewHelperTest.php+8 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/HtmlentitiesDecodeViewHelperTest.php+8 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/HtmlentitiesViewHelperTest.php+8 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/HtmlViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Format/PaddingViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ActionViewHelperTest.php+15 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/EmailViewHelperTest.php+5 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ExternalViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/FileViewHelperTest.php+6 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php+36 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/TypolinkViewHelperTest.php+4 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Sanitize/HtmlViewHelperTest.php+2 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Transform/HtmlViewHelperTest.php+8 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/CObjectViewHelperTest.php+22 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/FlashMessagesViewHelperTest.php+13 −0
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/TranslateViewHelperTest.php+8 −0
Review log 2329
Show 34 earlier messages
-
Georg Ringer uploaded patch set 1 10/20/24, 08:27
-
Georg Ringer commented on patch set 1 10/20/24, 08:27
This change is ready for review. -
core-ci voted on patch set 1 V +1 10/20/24, 08:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68250
-
Garvin Hicking commented on patch set 1 V +1 10/20/24, 09:58
Does it not affect 13.4? Maybe we could add a simple test for it that uses tagcontent with int and string once
-
Georg Ringer updated the commit message in patch set 2
V +110/21/24, 06:34 -
core-ci voted on patch set 2 V +1 10/21/24, 06:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68280
-
Benni Mack voted on patch set 2 CR +1 V +1 10/21/24, 08:29
-
Oli Bartsch commented on patch set 2 10/21/24, 08:32
Should we adjust similar VHs (link.page, link.external) as well? -
Christian Kuhn commented on patch set 2 10/21/24, 10:45
shouldn't be too hard to functional test this, too. and we may want to change the code to actively throw if renderChildren can *not* be cast to string, maybe? that would turn an error into a exception, which is good. -
Garvin Hicking commented on patch set 2 CR -1 10/22/24, 07:50
On it to add tests and apply to other viewhelpers -
Garvin Hicking uploaded patch set 3
CR +1V +110/22/24, 10:32Add tests add more cases -
core-ci voted on patch set 3 V -1 10/22/24, 10:41 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68361
-
Garvin Hicking uploaded patch set 4
V -110/22/24, 10:57 -
core-ci voted on patch set 4 V +1 10/22/24, 11:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68362
-
Garvin Hicking commented on patch set 4 CR +1 V +1 10/22/24, 11:36
Reply
That was a rabbit-hole, whelp. Note that a few tests needed to be created to verify existing behaviour. Let me know if this all needs to become a pre-patch, or if we can address it in one-go.Whelp, this -
Garvin Hicking commented on patch set 4 10/22/24, 11:40
Reply
DoneReply
Blowing that up for then needed assertions of all the tests would be quite some work. Maybe do that in a follow-up? -
Simon Praetorius commented on patch set 4 11/19/24, 13:23
InfoboxViewHelper.php:89How is this related to the original problem?TemplateIntegerTagContent.html:6Isn't this a syntax error because the tag is not properly closed? Seems like the test doesn't run properly. -
Garvin Hicking uploaded patch set 5
CR +1V +111/19/24, 14:12 -
Garvin Hicking commented on patch set 5 CR +1 V +1 11/19/24, 14:13
InfoboxViewHelper.php:89ReplyThis was a drive-by fix actually, because when in the tests the 'title' argument is missing it will yield an error in the functional tests. Would it be ok for you to include this here? ``` 1) TYPO3\CMS\Fluid\Tests\Functional\ViewHelpers\Be\InfoboxViewHelperTest::integerAsButtonRenderChildrenRendersTagContent TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, int given /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/typo3/sysext/fluid/Classes/ViewHelpers/Be/InfoboxViewHelper.php:110 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php:261 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php:69 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/ViewHelperNode.php:125 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/AbstractNode.php:59 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/AbstractNode.php:41 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php:305 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php:282 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/ViewHelpers/ForViewHelper.php:134 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php:261 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php:69 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/ViewHelperNode.php:125 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/AbstractNode.php:59 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/AbstractNode.php:41 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/RootNode.php:30 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/Core/Parser/ParsingState.php:88 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/vendor/typo3fluid/fluid/src/View/AbstractTemplateView.php:146 /Users/garvin/TYPO3/typo3-core-bugreproduce-base/typo3-core/typo3/sysext/fluid/Tests/Functional/ViewHelpers/Be/InfoboxViewHelperTest.php:42 ```TemplateIntegerTagContent.html:6ReplyGood catch; I created a file before I inlined the test content without needing to utilize a file. Removed it now. -
core-ci voted on patch set 5 V +1 11/19/24, 14:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69714
-
Simon Praetorius commented on patch set 5 11/19/24, 15:52
InfoboxViewHelper.php:89ReplyAcknowledged -
Simon Praetorius commented on patch set 5 CR +1 V +1 11/19/24, 15:54
Reply
We talked about this and decided that (for now) we are fine with the simple string cast. This is probably a ToDo for the Fluid API. -
Garvin Hicking updated the commit message in patch set 6
CR +1V +111/19/24, 17:50 -
Simon Praetorius voted on patch set 6 CR +1 V +1 11/19/24, 17:53
-
core-ci voted on patch set 6 V +1 11/19/24, 17:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69734
-
Garvin Hicking voted on patch set 6 CR +1 V +1 11/19/24, 18:12
-
Christian Kuhn voted on patch set 6 CR +1 11/19/24, 19:55
-
Garvin Hicking voted on patch set 6 CR +2 V +2 11/19/24, 19:57
-
Garvin Hicking merged patch set 7 11/19/24, 19:57