#102616TCA type selectSingle with itemsProcFunc doesn't show information in list view nor in export CSV
Description
If you define a TCA field like this :
'my_col' => [
'exclude' => false,
'label' => 'My col label',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 'value-1',
'itemsProcFunc' => \Vendor\MyExtUserFunc\TcaUserFunc::class ::class . '->getMyCol'
]
]
with itemsProcFunc like this :
public function getMyCol(&$parameters): void
{
$parameters['items'][] = ['Label value 1', 'value-1'];
$parameters['items'][] = ['Label value 2', 'value-2'];
}
In BE list view, if you want to display the ‘my_col’ value – or export it into CSV – by setting ‘show columns’ ‘my_col’ to true, the field show the value instead of the translation. I.e. ‘value-1’ or ‘value-2’ instead of ‘Label value 1’ or ‘Label value 2’.
While it works well with TCA like this :
'getMyCol' => [
'exclude' => false,
'label' => 'My col label',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'default' => 'value-1',
'items' => [
['Label value 1', 'value-1'],
['Label value 2', 'value-2'],
]
]
]
Same problem as this one https://forge.typo3.org/issues/100855
Reviews 4
- 12.4 82248[BUGFIX] Omit calling `getRecordWSOL` in `BU::getProcessedValue()`
- main 82264[BUGFIX] Omit calling `getRecordWSOL` in `BU::getProcessedValue()`
- main 82148[BUGFIX] Resolve itemsProcFunc in BackendUtility label functions
- 12.4 82118[BUGFIX] Resolve itemsProcFunc in BackendUtility label functions
Related issues 3
- Feature #25113itemsProcFunc is not taken into account while generating labels for select items in the list module
- Bug #100855TCA type radio with itemsProcFunc doesn't show information in list view nor in export CSV
- Bug #102698High load & response time after change itemsProcFunc in BackendUtility label functions