Bug #91808

Nested IRRE with maxitems hides last inline control button / toggles inline control buttons wrong

Added by Philipp Thiele 11 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2020-07-16
Due date:
% Done:

0%

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

Description

In TYPO3 Version 10.4.5 i have configured a nested inline relation:

'tx_sitepackage_stageitems' => [
    'exclude' => 1,
    'label' => 'LLL:EXT:sitepackage/Resources/Private/Language/locallang_db.xlf:tt_content.tx_sitepackage_stageitems',
    'config' => [
        'type' => 'inline',
        'foreign_table' => 'tx_sitepackage_domain_model_stageitem',
        'foreign_field' => 'contentelement',
        'minitems' => 1,
        'maxitems' => 3,
        'appearance' => [
            'collapseAll' => 1
        ],
    ]
],

In tx_sitepackage_stageitems i have configured a FAL relation:

'image' => array(
    'exclude' => 0,
    'label' => 'LLL:EXT:sitepackage/Resources/Private/Language/locallang_db.xlf:tx_sitepackage_domain_model_stageitem.image',
    'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
        'image',
        [
            'appearance' => [
                'fileUploadAllowed' => false
            ],
            'minitems' => 1,
            'maxitems' => 1
        ],
        $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
    ),
),

When an editor adds the last (third) tx_sitepackage_domain_model_stageitem, in this last one no file selector is shown for the image field.
sysext/backend/Resources/Public/JavaScript/FormEngine/Container/InlineControlContainer.js toggles all (even the nested) .t3js-inline-controls, and not only its own.


Files


Related issues

Related to TYPO3 Core - Bug #92381: Button "Create new" does not re-appear for inline (IRRE) elements after reaching maxitems and removing one elementClosed2020-09-23

Actions
Related to TYPO3 Core - Bug #78479: FAL field (in flexform) with minitems=1 and maxitems=1 has no possibility to add image after deleting the previous oneClosed2016-10-28

Actions
Related to TYPO3 Core - Bug #92382: levelLinksPosition=bottom is not working correctly especially with minitems=1 set and leads to misbehaviour in inline children Closed2020-09-23

Actions
Related to TYPO3 Core - Bug #93091: Missing "Create new relation"-buttons after deleting the former relationClosed2020-12-16

Actions
#1

Updated by Gerrit Code Review 11 months ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65058

#2

Updated by Daniel Goerz 11 months ago

  • Description updated (diff)
#3

Updated by Gerrit Code Review 10 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65058

#4

Updated by Gerrit Code Review 10 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65058

#5

Updated by Gerrit Code Review 10 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65058

#6

Updated by Anja Leichsenring 10 months ago

I created a styleguide example for the issue: https://github.com/TYPO3/styleguide/pull/159

#7

Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65728

#8

Updated by Nikita Hovratov 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#9

Updated by Gerrit Code Review 9 months ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65728

#10

Updated by Gerrit Code Review 9 months ago

Patch set 3 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65728

#11

Updated by Nikita Hovratov 9 months ago

  • Status changed from Under Review to Resolved
#12

Updated by Oliver Bartsch 9 months ago

  • Related to Bug #92381: Button "Create new" does not re-appear for inline (IRRE) elements after reaching maxitems and removing one element added
#13

Updated by Oliver Bartsch 9 months ago

  • Related to Bug #78479: FAL field (in flexform) with minitems=1 and maxitems=1 has no possibility to add image after deleting the previous one added
#14

Updated by Christian Buelter 9 months ago

  • Related to Bug #92382: levelLinksPosition=bottom is not working correctly especially with minitems=1 set and leads to misbehaviour in inline children added
#15

Updated by Benni Mack 9 months ago

  • Status changed from Resolved to Closed
#16

Updated by Thomas Goetz 4 months ago

Seems broken again.
Tested in:
10.4.12 = broken
10.4.11 = broken
10.4.10 = broken
10.4.9 = works

Adding an inline-item, save the record.
Remove the inline-item - no button to readd an other.

#17

Updated by Alex B. 4 months ago

  • Priority changed from Should have to Must have

I can confirm that issue appears again in 10.4.12.

#18

Updated by Oliver Pfaff 4 months ago

  • % Done changed from 100 to 0

I can also confirm that the bug exists in the latest 10.4.12 version.

Here is my TCA:

'preview_image' => [
            'exclude' => true,
            'label' => 'LLL:EXT:extensionname/Resources/Private/Language/locallang_db.xlf:model.preview_image',
            'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
                'preview_image',
                [
                    'appearance' => [
                        'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
                    ],
                    'foreign_types' => [
                        '0' => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ],
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
                            'showitem' => '
                            --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                            --palette--;;filePalette'
                        ]
                    ],
                    'foreign_match_fields' => [
                        'fieldname' => 'preview_image',
                        'tablenames' => 'table',
                        'table_local' => 'sys_file',
                    ],
                    'maxitems' => 1,
                    'minitems' => 1
                ],
                $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
            ),

        ],

this results in the user not being able to add a new image after removing it and not being able to save/reload the record.

#19

Updated by Joerg Kummer 4 months ago

We can confirm this issue with version 10.4.12

#20

Updated by Tim Karliczek 4 months ago

I can confirm this issue with TYPO3 10.4.12 too

#21

Updated by Ralf Merz 4 months ago

Maybe not the same, but maybe it is:

i have a FlexForm field with type="group".

<settings.configuration.contentElement>
                        <TCEforms>
                            <label>LLL:EXT:ft_customcontentelements/Resources/Private/Language/locallang.xlf:contentElement.topModule.FF.contentElement</label>
                            <config>
                                <type>group</type>
                                <internal_type>db</internal_type>
                                <allowed>tt_content</allowed>
                                <size>1</size>
                                <minitems>1</minitems>
                                <maxitems>1</maxitems>
                            </config>
                        </TCEforms>
                    </settings.configuration.contentElement>

Although I select a content element, I cannot save the record, as TYPO3 complains that the field should be filled out properly. This EXT was used in v8 before and now it's broken with that FlexForm.

#22

Updated by Joey Bouten 4 months ago

In our case of TCA field on pages i can confirm its fixed on v10.4.13

See:
https://github.com/TYPO3/TYPO3.CMS/commit/516b37e6d8

#23

Updated by Frans Saris 4 months ago

  • Related to Bug #93091: Missing "Create new relation"-buttons after deleting the former relation added
#24

Updated by Jan Kornblum 4 months ago

I can confirm this is fixed for TCA fields in 10.4.13 with #91808

Also available in: Atom PDF