77681[BUGFIX] Use property before value on fluid forms view helpers
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 6
- typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php+4 −30
- typo3/sysext/fluid/Classes/ViewHelpers/Form/ButtonViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/Form/RadioViewHelper.php+1 −1
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/TextfieldViewHelperTest.php+36 −0
- typo3/sysext/form/Resources/Private/Frontend/Partials/Form/Navigation.html+3 −3
Review log 2329
Show 24 earlier messages
-
Josua Vogel uploaded patch set 1 02/03/23, 13:50
-
core-ci voted on patch set 1 V -1 02/03/23, 14:54 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36987
-
core-ci commented on patch set 1 02/03/23, 15:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/36987
-
Josua Vogel rebased onto patch set 2
V -102/07/23, 07:10
-
core-ci voted on patch set 2 V -1 02/07/23, 08:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37247
-
Josua Vogel uploaded patch set 3
V -102/07/23, 08:25 -
core-ci voted on patch set 3 V +1 02/07/23, 08:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/37259
-
Tim Horstmann voted on patch set 3 CR +1 02/22/23, 11:15
-
Markus Klein commented on patch set 3 CR +1 03/10/23, 12:39
Great finding! Should this be adjusted for \TYPO3\CMS\Fluid\ViewHelpers\Form\ButtonViewHelper as well? -
Josua Vogel commented on patch set 3 03/14/23, 08:56
Reply
Hi Markus, with this fix, the value of the property attribute will be used first on the ButtonViewHelper. Do you mean, that the value attribute should be set directly for Buttons and the property attribute should be ignored? -
Oliver Klee commented on patch set 3 CR -1 03/14/23, 09:24
I think this commit message title should be more specific and make it clear at the first glance that this is about Fluid forms. (Otherwise, people looking at the changelog will have no idea what this is about.) -
Josua Vogel uploaded patch set 4
CR +1V +103/14/23, 10:21 -
Josua Vogel commented on patch set 4 03/14/23, 10:22
Reply
Hi Oliver, you´re right. Is the new title better? -
Oliver Klee commented on patch set 4 03/14/23, 10:25
Reply
Better by tons! Thanks! -
Markus Klein commented on patch set 4 03/14/23, 10:29
Reply
Yes, that's what the comment somewhere actually says. -
core-ci voted on patch set 4 V +1 03/14/23, 10:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38909
-
Josua Vogel uploaded patch set 5
V +103/14/23, 12:39 -
Josua Vogel commented on patch set 5 03/14/23, 12:40
Reply
Done -
core-ci voted on patch set 5 V +1 03/14/23, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38920
-
Markus Klein voted on patch set 5 V +1 CR +1 03/14/23, 13:49
-
Tim Horstmann voted on patch set 5 CR +1 03/28/23, 11:35
-
Benni Mack updated the commit message in patch set 6
CR +1V +105/03/23, 09:41 -
Simon Praetorius commented on patch set 6 CR -1 07/06/23, 09:07
I would argue that the current behavior (value overwrites property) should be kept as-is. From my point of view the user indicated by defining a value that this value should be taken into account. One possible use case for this I can think of is a form to edit a user. For the password field you would want to define property="password", but also value="" to not expose the current password hash to the form. There are probably other use cases for this when you want to set a different default value for a form than that in the associated form object. Judging from the code changes, the code could probably be optimized either way. -
Simon Praetorius commented on patch set 6 07/06/23, 09:13
Reply Unresolved
> Judging from the code changes, the code could probably be optimized either way. This could be misleading. :) I wanted to say that I like the optimizations in this patch, but don't agree with the change in behavior. -
Markus Klein commented on patch set 6 CR -1 07/06/23, 12:12
Thanks for the use case Simon. You are completely right. We need to re-think this and probably update the documentation. Josua, can you please elaborate on your use case on forge. You posted the example, by why would you put a value there if you have a property in place? -
Oliver Klee commented on patch set 6 10/08/23, 13:33
How should we proceed here? -
Josua Vogel commented on patch set 6 10/09/23, 12:17
Reply Unresolved
Hi Markus, hi Simon, you´re right. In most cases, you don´t have to put a value and a property. In my case, we used a partial to declare the label + input at one place and used it in many different templates. And the partial has the option to use either a property or value. -
Simon Praetorius commented on patch set 6 10/19/23, 10:38
I pushed a separate patch to update the ViewHelper documentation, at least as a first step: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81478 As I said above, I don't think that we should break the existing functionality here, and I haven't heard decisive arguments for it so far. -
Josua Vogel abandoned the change 07/29/24, 19:13