93524[BUGFIX] Avoid errors for optional values in f:render.text
Commit message
Review
-
Code review CR +2 Done
- Simon Praetorius +2
- Ulrich Mathes +1
- Matthias Vogel +1
-
Verified V +2 Done
- Simon Praetorius +2
- Ulrich Mathes +1
- Garvin Hicking +1
- Matthias Vogel +1
- core-ci +1 CI
Issues 3
Files 4
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-108868-IntroduceFluidRenderTextViewHelper.rst+26 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Render/TextViewHelper.php14+16 −5
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Render/TextViewHelperTest.php+32 −7
- typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/All.fluid.html+2 −2
Review log 3546
Show 1621 earlier messages
-
Simon Praetorius uploaded patch set 1 04/02/26, 11:44
-
Simon Praetorius marked it work in progress 04/02/26, 11:47
-
Mathias Brodala commented on patch set 1 04/02/26, 12:09
-
core-ci voted on patch set 1 V +1 04/02/26, 12:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99476
-
Ulrich Mathes uploaded patch set 2
V +104/03/26, 13:01add tests for RecordPropertyNotFoundException and optional -
core-ci voted on patch set 2 V +1 04/03/26, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99576
-
Matthias Vogel commented on patch set 2 04/04/26, 06:54
TextViewHelper.php:72ReplyDone -
Matthias Vogel uploaded patch set 3
V +104/04/26, 07:09 -
Garvin Hicking updated the commit message in patch set 4 04/04/26, 07:17
-
core-ci voted on patch set 3 V +1 04/04/26, 07:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99598
-
Garvin Hicking commented on patch set 4 04/04/26, 07:19
TextViewHelper.php:72How about having a "fallback" argument instead and be able to provide a fallback value (empty string or var)? -
Garvin Hicking commented on patch set 4 04/04/26, 07:27
We might need a specific issue and set this one as related only, because the fix here does not yet fix all that is reported in the issue. Unless we can squeeze in all fixes needed for that issue. -
core-ci voted on patch set 4 V +1 04/04/26, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99599
-
Ulrich Mathes commented on patch set 4 04/04/26, 08:09
TextViewHelper.php:113I think we should not ignore all of the following InvalidArgumentValueException as they might root from misusage of arguments instead of trying to access a field which is not present in the record object. -
Ulrich Mathes uploaded patch set 5
V +104/04/26, 08:59use RecordPropertyNotFoundException for unknown field in DomainObjects -
Simon Praetorius commented on patch set 5 04/04/26, 09:08
TextViewHelper.php:117We should wrap that in a `InvalidArgumentValueException` then. This will allow Fluid to add the affected template file to the exception output. -
core-ci voted on patch set 5 V +1 04/04/26, 09:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99602
-
Ulrich Mathes commented on patch set 5 04/04/26, 09:12
TextViewHelper.php:72ReplyHow about "default" in combination with "optional" as this will match many other ViewHelper arguments.TextViewHelper.php:113ReplyDone -
Garvin Hicking commented on patch set 5 04/04/26, 09:29
TextViewHelper.php:72ReplyI find "optional" to hide a fact that we have a "workaround" here in place then. And I'd rather only use one argument than two. But this is "naming things", so I've said my piece and am at peace with any decission made by Simon 😄 -
Dmitry Dulepov commented on patch set 5 04/04/26, 10:12
TextViewHelper.php:72ReplyI also think that "default" is better here. -
Matthias Vogel uploaded patch set 6
V +104/07/26, 11:43
-
Matthias Vogel commented on patch set 6 04/07/26, 11:55
Reply
DoneTextViewHelper.php:117ReplyDone -
core-ci voted on patch set 6 V -1 04/07/26, 11:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99691
-
Simon Praetorius commented on patch set 6 04/07/26, 12:27
TextViewHelper.php:72ReplyAfter thinking about this a bit, I'd prefer to stick to the simple `optional` solution without `default`. From my point of view, it's not self-explanatory when exactly that default would be chosen: * only if an exception is caught? * if the records API returns null? * if the records API returns an empty string? This probably needs to be decided on a case-by-case basis, which is possible with the `optional` solution (just for exceptions) if the ViewHelper then returns `null`: ``` <f:variable name="myText" value="{f:render.text(record: record, field: 'bodytext', optional: 1)}" /> <f:if condition="{myText} !== {null}"> <f:then>{myText}</f:then> <f:else>Fallback text</f:else> </f:if> ``` -
Matthias Vogel uploaded patch set 7
V -104/07/26, 12:36 -
Matthias Vogel uploaded patch set 8 04/07/26, 12:39
-
Simon Praetorius marked it ready for review 04/07/26, 12:45
-
core-ci voted on patch set 8 V +1 04/07/26, 12:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99695
-
core-ci voted on patch set 7 V +1 04/07/26, 13:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99694
-
Simon Praetorius uploaded patch set 9
V +104/07/26, 13:16 -
Simon Praetorius voted on patch set 9 CR +1 V +1 04/07/26, 13:16
-
core-ci voted on patch set 9 V +1 04/07/26, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99698
-
Matthias Vogel voted on patch set 9 CR +1 V +1 04/07/26, 13:47
-
Garvin Hicking commented on patch set 9 CR -1 04/07/26, 16:36
TextViewHelper.php:72ReplyStill not a fan of this naming. However, please update the changelog rest-file of this VH with this patch too, so that the docs team can catch the argument that needs to be added to the docs and mentions what this argument does and why the core fsc ext for example now needs that. -
Matthias Vogel uploaded patch set 10
CR +1V +104/07/26, 16:51 -
Matthias Vogel commented on patch set 10 CR +1 V +1 04/07/26, 16:52
TextViewHelper.php:72ReplyAdded Information to the rst -
core-ci voted on patch set 10 V +1 04/07/26, 17:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99709
-
Simon Praetorius voted on patch set 10 CR +1 V +1 04/07/26, 17:02
-
Garvin Hicking updated the commit message in patch set 11
CR +1V +104/07/26, 17:05 -
Garvin Hicking commented on patch set 11 V +1 04/07/26, 17:06
TextViewHelper.php:72ReplyThanks, resolving this comment. -
core-ci voted on patch set 11 V +1 04/07/26, 17:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99711
-
Ulrich Mathes voted on patch set 11 CR +1 V +1 04/07/26, 17:36
-
Matthias Vogel voted on patch set 11 CR +1 V +1 04/07/26, 19:16
-
Simon Praetorius voted on patch set 11 CR +1 V +1 04/07/26, 19:22
-
Simon Praetorius voted on patch set 11 CR +2 V +2 04/08/26, 07:48
-
Simon Praetorius merged patch set 12 04/08/26, 07:48
TextViewHelper.php:72