Actions
Bug #82104
closedIRRE + GROUP with real MM relations not working (fatal error)
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-08-15
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
group, irre, relations
Complexity:
Is Regression:
Sprint Focus:
Description
See /typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php line 189:
if ($type === 'select') {
// A resolved select field is an array - take first value
$value = $value['0'];
} else {
// A group field is still a list with pipe separated uid|tableName
$valueParts = GeneralUtility::trimExplode('|', $value);
$itemParts = explode('_', $valueParts[0]);
$value = [
'uid' => array_pop($itemParts),
'table' => implode('_', $itemParts)
];
}
// @todo: This is weird, $value has different structure for group and select fields?
$uniqueIds[$child['databaseRow']['uid']] = $value;
The ToDo says it all. ;-)
When not using a SELECT but a GROUP, this functions assumes the value is a string with a pipe for uid / tablename. However, when using real MM relations, $value contains an array with the uid and tablenames. This results in a fatal error:
#1476107295: PHP Warning: explode() expects parameter 2 to be string, array given in /vendor/typo3/cms/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1297 (More information)
Files
Actions