Review main Merged

81382[BUGFIX] Fix TypeErrors when using language argument

Kevin Appelt CR +2 V +2 Easy +11 −11 updated 10/09/23, 21:34

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

Review log 1820

  1. Kevin Appelt uploaded patch set 1 10/09/23, 11:27

  2. 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)?
  3. 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

  4. 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 :)
  5. Oliver Klee commented on patch set 1 V +1 CR +1 10/09/23, 12:08

    Reply

    Ack
  6. 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?
  7. 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?
  8. Simon Schaufelberger commented on patch set 1 10/09/23, 15:46

    It might be good to cover this issue with a test.
  9. Georg Ringer voted on patch set 1 V +1 CR +1 10/09/23, 18:41

  10. 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

    Done

    Reply

    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.
  11. 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?
  12. 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.
  13. Stefan Bürk voted on patch set 1 V 0 CR 0 10/09/23, 21:01

  14. Stefan Bürk uploaded patch set 2 CR +1 V +1 10/09/23, 21:09

  15. Simon Schaufelberger commented on patch set 2 10/09/23, 21:11

    Reply

    Done
  16. 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.
  17. 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

  18. 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 ;)
  19. Stefan Bürk commented on patch set 2 V +2 CR +2 10/09/23, 21:18

    Reply

    Ack
  20. Stefan Bürk merged patch set 3 10/09/23, 21:34