Project

General

Profile

Actions

Bug #92963

closed

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

Added by Tim Karliczek over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2020-12-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Files

group_foreign-side.png (32.1 KB) group_foreign-side.png Tim Karliczek, 2020-12-01 07:31
group_symmetric-side.png (31.1 KB) group_symmetric-side.png Tim Karliczek, 2020-12-01 07:31
select_foreign-side.png (21.1 KB) select_foreign-side.png Tim Karliczek, 2020-12-01 07:31
select_symmetric-side.png (21.1 KB) select_symmetric-side.png Tim Karliczek, 2020-12-01 07:31
Actions

Also available in: Atom PDF