Bug #88019
openEpic #90676: Clipboard related bugs and features
Page copying is not working as desired using clipboard
0%
Description
When in page module, while trying to copy a page and trying to 'Paste after' any random page an error is struck. Both of the pages have more than 2 alternative languages. The environment contains pages which are migrated with upgrade wizard tasks regarding pages_language_overlay changes.
The error is as follows #1486233164 RuntimeException, Child record was not processed
As an outcome, a page will be copied with incomplete data and translations.
Please see the screenshot attached.
The issue is within typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php, where a synchronizeFieldValues() function receives an empty array as a parameter along with other values. In line no. 319
//$forRecord is declared as an array. So it will always be.
$forRecord = [];
if (!$item->isNew()) {
$forRecord = BackendUtility::getRecordWSOL(
$item->getTableName(),
$item->getId(),
$fieldNameList
);
}
//Even if $forRecord is not populated, control will bypass following condition as it is an is_array() check
if (is_array($fromRecord) && is_array($forRecord)) {
foreach ($fieldNames as $fieldName) {
$this->synchronizeFieldValues(
$item,
$fieldName,
$fromRecord,
$forRecord
);
}
}
}
This can be solved by adjusting the condition as,
if (is_array($fromRecord) && !empty($forRecord)) {
foreach ($fieldNames as $fieldName) {
$this->synchronizeFieldValues(
$item,
$fieldName,
$fromRecord,
$forRecord
);
}
}
Files
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Christian Eßl over 4 years ago
- Related to Epic #90676: Clipboard related bugs and features added