Bug #84550

"l10n_display = defaultAsReadonly" throws exception for "type = group" elements

Added by Torben Hansen almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-03-28
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TCA is as following (shorted)

        'fieldname' => [
            'exclude' => 0,
            'l10n_mode' => 'exclude',
            'l10n_display' => 'defaultAsReadonly',
            'label' => 'A label,
            'config' => [
                'type' => 'group',
                'internal_type' => 'db',
                ...
            ],
        ],

How to reproduce:

1) Create a record in the default language
2) Localize the record in list module

In order to quickly reproduce the problem, you can install ext:news and change to TCA for the field "related" of the table "tx_news_domain_model_news" as shown above.

Result:

The following PHP exception is thrown:

PHP Warning: Invalid argument supplied for foreach() in /path/to/typo3/sysext/backend/Classes/Form/Element/GroupElement.php line 158

The $selectedItems value is `0` instead of an array resulting in the error shown above


Related issues

Duplicates TYPO3 Core - Bug #85531: Error with "select" and "group" field using l10n_display "defaultAsReadonly" New 2018-07-10

History

#1 Updated by Mathias Brodala over 1 year ago

  • Duplicates Bug #85531: Error with "select" and "group" field using l10n_display "defaultAsReadonly" added

#2 Updated by Mathias Brodala over 1 year ago

  • Status changed from New to Closed

See #85531

Also available in: Atom PDF