Project

General

Profile

Actions

Bug #91808

closed

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

Added by Philipp Thiele almost 4 years ago. Updated about 2 years 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 6 (0 open6 closed)

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
Related to TYPO3 Core - Bug #93238: Regression: After deleting image in record "add" button is not displayed againClosed2021-01-07

Actions
Related to TYPO3 Core - Bug #91595: Not all elements displayed as button behave like buttonsClosed2020-06-05

Actions
Actions #1

Updated by Gerrit Code Review almost 4 years 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

Actions #2

Updated by Daniel Goerz over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review over 3 years 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

Actions #4

Updated by Gerrit Code Review over 3 years 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

Actions #5

Updated by Gerrit Code Review over 3 years 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

Actions #6

Updated by Anja Leichsenring over 3 years ago

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

Actions #7

Updated by Gerrit Code Review over 3 years 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

Actions #8

Updated by Nikita Hovratov over 3 years ago

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

Updated by Gerrit Code Review over 3 years 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

Actions #10

Updated by Gerrit Code Review over 3 years 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

Actions #11

Updated by Nikita Hovratov over 3 years ago

  • Status changed from Under Review to Resolved
Actions #12

Updated by Oliver Bartsch over 3 years ago

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

Updated by Oliver Bartsch over 3 years 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
Actions #14

Updated by Christian Buelter over 3 years ago

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

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Thomas Anders about 3 years 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.

Actions #17

Updated by Alex B. about 3 years ago

  • Priority changed from Should have to Must have

I can confirm that issue appears again in 10.4.12.

Actions #18

Updated by Oliver Pfaff about 3 years 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.

Actions #19

Updated by Joerg Kummer about 3 years ago

We can confirm this issue with version 10.4.12

Actions #20

Updated by Tim Karliczek about 3 years ago

I can confirm this issue with TYPO3 10.4.12 too

Actions #21

Updated by Ralf Merz about 3 years 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.

Actions #22

Updated by Joey Bouten about 3 years 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

Actions #23

Updated by Frans Saris about 3 years ago

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

Updated by Jan Kornblum about 3 years ago

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

Actions #25

Updated by Frank Gerards over 2 years ago

I can confirm a use case, where this behaviour is NOT fixed:

steps to reproduce:

  • define a table-TCA (TABLE_A) with a FAL relation field
  • define a parent-table TCA (TABLE_B) with a field type "inline" which relates to TABLE_A
  • add new TABLE_B record and dont save yet - add a TABLE_A item as IRRE relation

result: The "Add image" Button is hidden in the inline child.
After saving TABLE_B record and reopening the TABLE_A inline relation, the "Add image" button is there.

UPDATE: to me, it this seems like a regression introduced by https://github.com/TYPO3/typo3/commit/516b37e6d8 - if i revert this change, the "Add image" button in the case described above works

Actions #26

Updated by Christian Kuhn about 2 years ago

  • Related to Bug #93238: Regression: After deleting image in record "add" button is not displayed again added
Actions #27

Updated by Christian Kuhn about 2 years ago

  • Related to Bug #91595: Not all elements displayed as button behave like buttons added
Actions #28

Updated by Christian Kuhn about 2 years ago

I guess we should put any left over issues into a new issue and set this one related.

Actions

Also available in: Atom PDF