Project

General

Profile

Bug #88624

Updated by Markus Klein over 5 years ago

Due to undefined [config][items] of renderType=selectTree a PHP Warning is issued: 

 <pre> 
 #1476107295: PHP Warning: array_column() expects parameter 1 to be array, null given in typo3_src_8.7/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php line 241 
 </pre> 

 The reason is that no FormDataProvider is generating the @items@ array for a tree (only for all other types of select elements). 

 A cheap workaround is to add an empty @items@ array to the TCA: 

 <pre> 
 'category' => [ 
     'exclude' => false, 
     'label' => 'Foo', 
     'config' => [ 
         'type' => 'select', 
         'renderType' => 'selectTree', 
         'foreign_table' => 'sys_category', 
         'foreign_table_where' => 'AND sys_category.pid IN (###PAGE_TSCONFIG_IDLIST###) AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC', 
         'items' => [], 
         'minitems' => 1, 
         'maxitems' => 1, 
         'treeConfig' => [ 
             'parentField' => 'parent', 
             'appearance' => [ 
                 'expandAll' => true, 
                 'showHeader' => true, 
                 'maxLevels' => 2, 
                 'nonSelectableLevels' => '0,1' 
             ], 
         ] 
     ], 
 ], 
 </pre> 

 The core needs a fix to handle the missing items array correctly. 

 We face this issue with a custom extension that uses this TCA inside a record that is nested with IRRE in the main record. 
 Main record: project 
 Nested record: assignment (relation to project and to sys_category)

Back