Review main Abandoned

85799[BUGFIX] Always add passthrough fields to RecordObject properties

Nikita Hovratov CR 0 V 0 Normal +61 −1 updated 08/28/24, 09:05

Commit message

The TCA type "passthrough" is normally not defined in "showitems"
and thus not added by TcaSchema to FieldCollection. These values
are often filled by outside processes, but are still needed when
working with them. To circumvent this problem, type passthrough
fields are now always added to the properties of RecordObject.

This also shows a current weakness in TCA: showitems is used
to display fields in FormEngine, but also as the source of
truth to define which fields belong to the sub-schema.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 2

Review log 69

  1. Nikita Hovratov uploaded patch set 1 08/27/24, 18:16

  2. core-ci voted on patch set 1 V -1 08/27/24, 18:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64348

  3. Nikita Hovratov uploaded patch set 2 V -1 08/27/24, 18:39

  4. core-ci voted on patch set 2 V -1 08/27/24, 18:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64353

  5. core-ci voted on patch set 2 V +1 08/27/24, 19:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/64353

  6. Oli Bartsch commented on patch set 2 08/28/24, 07:46

    I'm not quite sure why we should add those fields to the record while they are always available via the "rawRecord". If we add them to the record, this has to happen in both createFromDatabaseRow and createResolvedRecordFromDatabaseRow. Actually, doing this in createRecord might even be better.
  7. Nikita Hovratov commented on patch set 2 08/28/24, 07:49

    Reply

    Because you can't access values from RawRecord directly in Fluid. The RecordObject will currently check if the field is part of the properties. If not, it will not be returned. So it is impossible to access passthrough fields in Fluid for sub-schema records.
  8. Oli Bartsch commented on patch set 2 08/28/24, 07:58

    Reply Unresolved

    So, would it be an idea to add those fields to corresponding sub schemas? I think semantically this would be the correct way, because we currently treat "showitem" as the central place about which fields are available for a sub schema. I think the reason, the passthrough fields had not been added to the corresponding showitem's before was because showitem was only considered as backend form rendering definiton for which passthrough was not relevant.
  9. Nikita Hovratov abandoned the change 08/28/24, 09:05

    Solution for now is to use the rawRecord to aquire passthrough field values.