92870[TASK] Allow Extbase models in `f:render.text` ViewHelper
Commit message
Review
-
Code review CR +2 Done
- Simon Praetorius +2
- Garvin Hicking +1
-
Verified V +2 Done
- Simon Praetorius +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/14.2/Feature-108868-IntroduceFluidRenderTextViewHelper.rst2+25 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/TtContentWithCType.phpnew+47 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/Extbase/Persistence/Classes.php+14 −0
- typo3/sysext/fluid/Classes/ViewHelpers/Render/TextViewHelper.php9+80 −11
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Render/TextViewHelperTest.php+120 −126
Review log 3143
Show 1218 earlier messages
-
Matthias Vogel uploaded patch set 1 02/17/26, 16:21
-
core-ci voted on patch set 1 V -1 02/17/26, 16:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96067
-
Matthias Vogel updated the commit message in patch set 2
V -102/17/26, 16:33 -
core-ci voted on patch set 2 V -1 02/17/26, 16:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96069
-
Matthias Vogel uploaded patch set 3
V -102/17/26, 16:59 -
core-ci voted on patch set 3 V +1 02/17/26, 17:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96072
-
Matthias Vogel marked it ready for review 02/17/26, 17:11
-
Matthias Vogel uploaded patch set 4
V +102/17/26, 17:29 -
Garvin Hicking commented on patch set 4 02/17/26, 17:33
ModelToRawRecordService.php:37```suggestion * and transforms it into a RawRecord that can be used if a RecordInterface is needed. ```ModelToRawRecordService.php:44```suggestion $languageField = $dataMap->getLanguageIdColumnName(); ``` (Also other usages)ModelToRawRecordService.php:59Maybe stricter null check here for safety?ModelToRawRecordService.php:62Accessing ObjectStorage should IMO be covered, especially for fal/category and other resolving? Then we are also quite close to this feature request that I just said "don't hold your breath": https://forge.typo3.org/issues/101125#change-562284 :-DTextViewHelper.php:37This should be explained (with examples) in the ReST - underscore/lower/upper/camelcasing in Extbase is a minefield ;) -
core-ci voted on patch set 4 V +1 02/17/26, 17:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96073
-
Oli Bartsch commented on patch set 4 02/18/26, 07:45
ModelToRawRecordService.php:28This is more a Migration/Migrator (naming-wise).ModelToRawRecordService.php:37Reply```suggestion * and transforms it into a RawRecord that can be used when a RecordInterface is needed. ``` -
Matthias Vogel uploaded patch set 5
V +102/18/26, 09:00 -
core-ci voted on patch set 5 V -1 02/18/26, 09:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96108
-
Matthias Vogel commented on patch set 5 02/18/26, 09:09
ModelToRawRecordService.php:28ReplyDoneModelToRawRecordService.php:37ReplyDoneModelToRawRecordService.php:44ReplyDoneModelToRawRecordService.php:59ReplyDoneModelToRawRecordService.php:62ReplyDoneTextViewHelper.php:37ReplyDone -
Matthias Vogel uploaded patch set 6
V -102/18/26, 09:33 -
Matthias Vogel commented on patch set 6 02/18/26, 09:33
ModelToRawRecordService.php:28ReplyDone -
core-ci voted on patch set 6 V -1 02/18/26, 10:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96110
-
Matthias Vogel uploaded patch set 7
V -102/18/26, 11:54
-
core-ci voted on patch set 7 V -1 02/18/26, 12:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96126
-
Simon Praetorius commented on patch set 7 02/18/26, 16:26
ModelToRawRecordService.php:28ReplyWhy is this done? :) I would also prefer a different name, something like `DomainObjectConverter` or even just a second (internal) `RecordFactory`? And the method name should then be adjusted accordinglyModelToRawRecordService.php:62isn't that the same as `is_scalar() || === null`?TextViewHelper.php:51This is a deeper issue in Fluid that we cannot easily resolve. Thus, we should explain why this isn't a problem here (input is always an object, ViewHelper takes care of escaping internally). -
Matthias Vogel uploaded patch set 8
V -102/19/26, 07:20 -
Matthias Vogel commented on patch set 8 02/19/26, 07:21
ModelToRawRecordService.php:28Replyit is currently called: `\TYPO3\CMS\Extbase\Migrator\ModelToRawRecordMigrator`ModelToRawRecordService.php:62ReplyDoneTextViewHelper.php:51ReplyDone -
Matthias Vogel uploaded patch set 9 02/19/26, 07:27
-
core-ci voted on patch set 8 V +1 02/19/26, 07:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96216
-
core-ci voted on patch set 9 V +1 02/19/26, 07:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96217
-
Simon Praetorius commented on patch set 9 CR -1 02/19/26, 12:50
Feature-108868-IntroduceFluidRenderTextViewHelper.rst:62Note that Extbase models need to contain all columns that should be rendered and the record type column (if configured in TCA) for this to work correctly. For example, an Extbase model that represents `tt_content` must map both `bodytext` and `ctype` to be able to use :html:`<f:render.text record="{contentModel}" field="bodytext" />`.ModelToRawRecordMigrator.php:34As discussed, I think it makes sense to reduce the functionality to an absolute minimum and to potentially copy this to the ViewHelper, at least for now. From my point of view, the current code demonstrates that we're trying to add something that wasn't meant to be added like this.ModelToRawRecordMigrator.php:46I think it should be clarified here what the goal is exactly: To reverse-engineer the persisted row in the database or to extract the current state of the model if it were persisted (= with current changes that are not persisted yet). The comment suggests that additional database queries would be an alternative option, which would only be the case for variant 1. I'd argue that the goal is variant 2, so extracting from the object is the only option. -
Matthias Vogel uploaded patch set 10
CR -1V +102/19/26, 15:44 -
Matthias Vogel commented on patch set 9 02/19/26, 15:46
Feature-108868-IntroduceFluidRenderTextViewHelper.rst:62ReplyDoneModelToRawRecordMigrator.php:34ReplyAs discussed, we remove this Migrator and handle only the necessary fields inside TextViewHelper.ModelToRawRecordMigrator.php:46ReplyAs discussed, we remove this Migrator and handle only the necessary fields inside TextViewHelper. -
Matthias Vogel commented on patch set 10 02/19/26, 15:48
TextViewHelper.php:184We need to decide whether we want this fallback. Currently, I'm against it because it only complicates things for the user. -
core-ci voted on patch set 10 V +1 02/19/26, 15:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96263
-
Simon Praetorius commented on patch set 10 02/19/26, 18:48
TextViewHelper.php:156I think this should be just `DomainObjectInterface $input`TextViewHelper.php:184ReplyI would also start with the simplest option, so no fallback. -
Matthias Vogel uploaded patch set 11
V +102/20/26, 06:56 -
Matthias Vogel commented on patch set 11 02/20/26, 06:57
TextViewHelper.php:156ReplyDoneTextViewHelper.php:184Replyremoved for now -
core-ci voted on patch set 11 V +1 02/20/26, 07:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96303
-
Simon Praetorius commented on patch set 11 CR +1 V -1 02/22/26, 18:38
Unfortunately, this no longer works with my local example (generic `tt_content` model with no further mapping). The problem seems to be that the mapping between `CType` (database) and `ctype` (Extbase Model) no longer works, which it did with the separate service class. -
Simon Praetorius voted on patch set 11 CR 0 02/22/26, 18:39
-
Matthias Vogel uploaded patch set 12
V +102/23/26, 08:10 -
Matthias Vogel commented on patch set 12 02/23/26, 08:11
Reply
Added test case for this problem. Works now. -
core-ci voted on patch set 12 V +1 02/23/26, 08:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96541
-
Simon Praetorius voted on patch set 12 CR +1 V +1 02/23/26, 16:04
-
Garvin Hicking voted on patch set 12 CR +1 V +1 02/23/26, 16:26
-
Simon Praetorius voted on patch set 12 CR +2 V +2 02/24/26, 06:57
-
Simon Praetorius merged patch set 13 02/24/26, 06:58
ModelToRawRecordService.php:28