Bug #92292
openSet reference to an element - paste records
0%
Description
I copy the content of a page from a page and insert a record (shortcut) on any page. Now I would like to paste the copied page content into records using the icon (paste records from the clipboard). Does not work, just no title is inserted. Even with save, the page content is not adopted - remains empty.
See PrintScreens
Files
Updated by Andreas Kiessling over 3 years ago
I can confirm the bug (on 10.4.8)
Seems like this was broken in #88711
https://github.com/TYPO3/TYPO3.CMS/blob/7b919798c8784ba3a3dd8cb82ab2d8a7e777878a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php#L105
The code only works, if one of the multi-clipboards is used, that means: use list module, select a non-default clipboard and move/copy some records to it.
With the default clipboard, the supposed record uid is only the counter, thus the button tries to insert tt_content_1
Copying the code from below seems to help to properly extract the uid from the clipboard array
// Only some tables, filter them:
foreach ($allowed as $tablename) {
foreach ($clipboard->elFromTable($tablename) as $elementValue => $recordUid) {
[$elementTable, $elementUid] = explode('|', $elementValue);
$record = BackendUtility::getRecordWSOL($tablename, $elementUid);
$sanitizedClipboardElements[] = [
'title' => BackendUtility::getRecordTitle($tablename, $record),
'value' => $tablename . '_' . $elementUid,
];
}
}
Updated by Andreas Kiessling over 3 years ago
- Related to Bug #88711: Clipboard (multi-selection mode) + Plugin Insert Records added
Updated by Frank Müller over 2 years ago
- PHP Version set to 7.4
Bug is still reproducable in 10.4.21