#91611itemProcFunc is failing due to AbstractItemProvider
Description
in
TYPO3\CMS\Backend\Form\FormDataProvider\AbstractItemProvider::resolveItemProcessorFunction
the wrong results are returned. I checked it in TYPO3 9.5 but verified the code of version 10.4 too and it is at least fundamentally the same:
Here the individual function is called with prepared $processorParameters:
$processorParameters = [
// Function manipulates $items directly and return nothing
'items' => &$items,
'config' => $config,
'TSconfig' => $pageTsProcessorParameters,
'table' => $table,
'row' => $result['databaseRow'],
'field' => $fieldName,
];
if (!empty($result['flexParentDatabaseRow'])) {
$processorParameters['flexParentDatabaseRow'] = $result['flexParentDatabaseRow'];
}
try {
GeneralUtility::callUserFunction($config['itemsProcFunc'], $processorParameters, $this);
} catch (\Exception $exception) { ... }
Afterwards `$items` is returned.
The fault is that $items is not the same like $processorParameters[‘items’] and $items is un-altered still the old data.
I changed the last method-line to
return $processorParameters['items'];
and got the expected results.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.