Bug #92292

Set reference to an element - paste records

Added by Michelle Dünner-Meli 9 months ago. Updated 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2020-09-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
shortcut records
Complexity:
Is Regression:
Sprint Focus:

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

Datensatz_einfuegen.png (86.2 KB) Datensatz_einfuegen.png Michelle Dünner-Meli, 2020-09-11 15:43
Datensatz_eingefuegt.png (66.5 KB) Datensatz_eingefuegt.png Michelle Dünner-Meli, 2020-09-11 15:43

Related issues

Related to TYPO3 Core - Bug #88711: Clipboard (multi-selection mode) + Plugin Insert RecordsClosed2019-07-09

Actions
#1

Updated by Andreas Kiessling 9 months 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,
        ];
    }
}
#2

Updated by Andreas Kiessling 9 months ago

  • Related to Bug #88711: Clipboard (multi-selection mode) + Plugin Insert Records added

Also available in: Atom PDF