Commit 9b426a5a authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Susanne Moog
Browse files

[BUGFIX] IRRE: Create a correct original value identifier

The value of `data-table-unique-original-value` was accidentally of type
array. This causes runtime errors since a string is expected.

This patch now creates a proper value passed to FormEngine to handle the
original unique value.

Resolves: #89588
Related: #87711
Releases: master, 9.5
Change-Id: I9184aa025f01196d0c206b5b86c712dc1049487f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62195

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
parent 2c2f28e2
......@@ -188,6 +188,11 @@ class InlineRecordContainer extends AbstractContainer
}
$class .= ($isNewRecord ? ' inlineIsNewRecord' : '');
$originalUniqueValue = '';
if (isset($data['inlineData']['unique'][$domObjectId . '-' . $foreignTable]['used'][$record['uid']])) {
$uniqueValueValues = $data['inlineData']['unique'][$domObjectId . '-' . $foreignTable]['used'][$record['uid']];
$originalUniqueValue = $uniqueValueValues['table'] . '_' . $uniqueValueValues['uid'];
}
$containerAttributes = [
'id' => $objectId . '_div',
'class' => 'form-irre-object panel panel-default panel-condensed ' . trim($class),
......@@ -196,7 +201,7 @@ class InlineRecordContainer extends AbstractContainer
'data-field-name' => $appendFormFieldNames,
'data-topmost-parent-table' => $data['inlineTopMostParentTableName'],
'data-topmost-parent-uid' => $data['inlineTopMostParentUid'],
'data-table-unique-original-value' => $data['inlineData']['unique'][$domObjectId . '-' . $foreignTable]['used'][$record['uid']] ?? '',
'data-table-unique-original-value' => $originalUniqueValue,
];
$html = '
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment