Issue Bug Closed

#92963FormEngine displays wrong field on symmetric side when type group is used for foreign_field/symmetric_field

Tim Karliczek 12/01/20, 07:36 updated 10/04/22, 14:12

Description

Steps to reproduce the problem

  • Install EXT:styleguide
  • Inside styleguide/Configuration/TCA/tx_styleguide_inline_mnsymmetric_mm.php change the TCA for the fields hotelid and branchid to type group:
        'hotelid' => [
            'label' => 'hotelid',
            'config' => [
                'type' => 'group',
                'internal_type' => 'db',
                'allowed' => 'tx_styleguide_inline_mnsymmetric',
                'minitems' => 1,
                'maxitems' => 1,
                'size' => 1,
            ]
        ],
        'branchid' => [
            'label' => 'branchid',
            'config' => [
                'type' => 'group',
                'internal_type' => 'db',
                'allowed' => 'tx_styleguide_inline_mnsymmetric',
                'minitems' => 1,
                'maxitems' => 1,
                'size' => 1,
            ]
        ],
  • Clear the TYPO3 cache
  • Create two records of table `tx_styleguide_inline_mnsymmetric` inside the TYPO3 backend
  • Edit the second record, click on “Create new” in field branches
  • A new IRRE shows up, inside the IRRE in the field branchid select the first created record
  • Save your changes

Actual results

  • In Record 1 and Record 2 inside the IRRE the field branchid is displayed

Expected results

  • In Record 1 (in this case it’s the symmetric side) hotelid should be displayed
  • In Record 2 (in this case it’s the foreign side) branchid should be displayed

Additional notes

  • Per default EXT:styleguide uses select fields inside styleguide/Configuration/TCA/tx_styleguide_inline_mnsymmetric_mm.php
  • This is working like expected, the bug occures only with type group

After some debugging i noticed, that the condition inside typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineIsOnSymmetricSide.php->addData() is not working for type group.

I tested with:
  • TYPO3 10.4.10, EXT:styleguide 10.0.4
  • TYPO3 current master, EXT:styleguide 11.0.1

Reviews 1