Bug #99315
closedPHP Warning: Undefined array key "MM" in .../typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php line 511
100%
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.
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,
],
];
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'])) {
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
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
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
Updated by Benni Mack almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0d39a6a8282d3e8c712f2210635c5202a98f4ddf.