Skip to content

Commit

Permalink
[BUGFIX] Handle empty field array in FormEngine
Browse files Browse the repository at this point in the history
There might be use cases, a record is requested
while the table and record type combination does
not contain any fields to render (empty showitem).

This happens, e.g. because a record used for
inline elements only does not define any showitem
by default but via corresponding overrideChildTca.
If such record is now requested without the parent
context, e.g. via link in the references table of
the element information view, a corresponding
message is displayed instead of a "undefined
array key" PHP warning.

Resolves: #105491
Resolves: #104963
Releases: main, 13.4, 12.4
Change-Id: I81ae0807c73af938c15af03248692bc33f2d82f0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86806
Tested-by: Benni Mack <[email protected]>
Tested-by: Oliver Bartsch <[email protected]>
Tested-by: core-ci <[email protected]>
Tested-by: Jochen Roth <[email protected]>
Reviewed-by: Benni Mack <[email protected]>
Reviewed-by: Jochen Roth <[email protected]>
Reviewed-by: Oliver Bartsch <[email protected]>
  • Loading branch information
o-ba committed Nov 4, 2024
1 parent 0729e65 commit b793095
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Configuration/TCA/tx_styleguide_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
['label' => 'type 0', 'value' => '0'],
['label' => 'Type with changed fields', 'value' => 'withChangedFields'],
['label' => 'Type with columnsOverrides', 'value' => 'withColumnsOverrides'],
['label' => 'Type with no fields', 'value' => 'withoutFieldsToRender'],
],
],
],
Expand Down Expand Up @@ -82,6 +83,9 @@
],
],
],
'withoutFieldsToRender' => [
'showitem' => '',
],
],

];

0 comments on commit b793095

Please sign in to comment.