81382[BUGFIX] Fix TypeErrors when using language argument
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Simon Schaufelberger +1
-
Verified V +2 Done
- Stefan Bürk +2
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 7
- typo3/sysext/fluid/Classes/ViewHelpers/Link/ActionViewHelper.php+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Link/PageViewHelper.php+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Link/TypolinkViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Uri/ActionViewHelper.php+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Uri/PageViewHelper.php+2 −2
- typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php+1 −1
- typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php+1 −1
Review log 1820
-
Kevin Appelt uploaded patch set 1 10/09/23, 11:27
-
Oliver Klee commented on patch set 1 10/09/23, 11:31
Is 11.5 affected as well (or would it make sense to backport this to 11.5)? -
core-ci voted on patch set 1 V +1 10/09/23, 11:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47591
-
Kevin Appelt commented on patch set 1 10/09/23, 11:41
Reply
v11 uses very different code compared to v12 and main and a quick check showed, that linking to different languages works fine in 11.5.31. Thats why I just mentioned main and 12.4 :) -
Oliver Klee commented on patch set 1 V +1 CR +1 10/09/23, 12:08
Reply
Ack -
Garvin Hicking commented on patch set 1 10/09/23, 14:30
Couldn't maybe the Viewhelper instead use composite types like ?string|int instead? That makes possibly itchy int-to-string casting obsolete and provides more specific type hinting? -
Simon Schaufelberger commented on patch set 1 10/09/23, 15:45
There are a couple of other viewhelpers with a language parameter as well. Is this the only viewhelper that causes this issue or might there be another one as well? -
Simon Schaufelberger commented on patch set 1 10/09/23, 15:46
It might be good to cover this issue with a test. -
Georg Ringer voted on patch set 1 V +1 CR +1 10/09/23, 18:41
-
Stefan Bürk commented on patch set 1 V +2 CR +2 10/09/23, 20:43
Reply
Feel free to look that up and creating a dedicated patch to streamline that. This change tackles a reported issue as a small bugfix for now.Reply
DoneReply
That's not possible from fluid viewhelper way to register such types. At least, the type should be ensured to be either string or null if not provided from fluid. Which would be `string|null` then and okay. Can be addressed in fluid, but I guess not as quickly as fixing it here for now and backporting it. -
Simon Schaufelberger commented on patch set 1 10/09/23, 20:48
Reply
The PageViewHelperTest does NOT have a test with language parameter. How can this be done? -
Simon Schaufelberger commented on patch set 1 CR -1 10/09/23, 20:50
There is also a PageViewHelper in the TYPO3\CMS\Fluid\ViewHelpers\Link which should also be adjusted. -
Stefan Bürk voted on patch set 1 V 0 CR 0 10/09/23, 21:01
-
Stefan Bürk uploaded patch set 2
CR +1V +110/09/23, 21:09 -
Simon Schaufelberger commented on patch set 2 10/09/23, 21:11
Reply
Done -
Stefan Bürk commented on patch set 2 10/09/23, 21:14
Reply
Added, along with the other ViewHelpers.Reply
Basically: ``` * Make a special testcase which does not cut database (current testcases are not suitable due to missing database support): - Ensure that needed translated data is available - write a test with a template and expected result and invoke it or * Makeing a full page setup with a content element / typoscript fluidtemplate definition with a template using the viewhelper, provided along with database entries and making a full request (subRequest), and checking the response content if everything went right. or * ... ``` Please feel free to add tests for this and all other added viewhelpers now. -
core-ci voted on patch set 2 V +1 10/09/23, 21:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47622
-
Simon Schaufelberger commented on patch set 2 V +1 CR +1 10/09/23, 21:16
Reply
well, this won't be done until tomorrow. I will approve it if you merge it tonight so Kevin is happy tomorrow ;) -
Stefan Bürk commented on patch set 2 V +2 CR +2 10/09/23, 21:18
Reply
Ack -
Stefan Bürk merged patch set 3 10/09/23, 21:34