Project

General

Profile

Actions

Bug #99315

closed

PHP Warning: Undefined array key "MM" in .../typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php line 511

Added by Tee Ohh almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2022-12-08
Due date:
% Done:

100%

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

Description

If I configured in the TCA a tree field with 'type' = 'select' and 'renderType' => 'selectTree' I get a PHP Warning: Undefined array key "MM" in .../typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php line 511

The tree is not displayed.

Actions #1

Updated by Tee Ohh almost 2 years ago

This error is also present in Version 11.5.22. Please have a look on it.

Example

$TCA['fe_users']['columns']['subgroup'] = [
    'exclude' => true,
    'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:fe_groups.subgroup',
    'config' => [
        'type' => 'select',
        'renderType' => 'selectTree',
        'foreign_table' => 'fe_groups',
        'foreign_table_where' => 'ORDER BY fe_groups.sorting',
        'size' => 35,
        'autoSizeMax' => 10,
        'maxitems' => 500,
        'treeConfig' => [
            'dataProvider' => 'Vendor\\ExtensionNameSpace\\Tree\\TableConfiguration\\GroupTreeDataProvider',
            'childrenField' => 'subgroup',
            'appearance' => [
                'showHeader' => true,
                'expandAll' => true,
                'maxLevels' => 10,
            ],
        ],
        'minitems' => 0,
    ],
];

Actions #2

Updated by Tee Ohh almost 2 years ago

Fix:
\typo3\sysext\core\Classes\Tree\TableConfiguration\DatabaseTreeDataProvider.php LINE 511

OLD: if ($this->columnConfiguration['MM']) {
NEW: if (!empty($this->columnConfiguration['MM'])) {

\typo3\sysext\core\Classes\Tree\TableConfiguration\DatabaseTreeDataProvider.php LINE 522

OLD: } elseif ($this->columnConfiguration['foreign_field']) {
NEW: } elseif (!empty($this->columnConfiguration['foreign_field'])) {

Actions #3

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

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

Actions #4

Updated by Gerrit Code Review almost 2 years ago

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

Actions #5

Updated by Gerrit Code Review almost 2 years ago

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

Actions #6

Updated by Benni Mack almost 2 years ago

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

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF