Project

General

Profile

Actions

Bug #92292

open

Set reference to an element - paste records

Added by Michelle Dünner-Meli almost 4 years ago. Updated about 1 month 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:
12
PHP Version:
8.1
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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Andreas Kießling almost 4 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,
        ];
    }
}
Actions #2

Updated by Andreas Kießling almost 4 years ago

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

Updated by Frank Müller over 2 years ago

  • PHP Version set to 7.4

Bug is still reproducable in 10.4.21

Actions #4

Updated by Andreas Kießling about 1 year ago

also present in 11.5.26

Actions #5

Updated by Heinz Schilling about 1 month ago

  • TYPO3 Version changed from 10 to 12
  • PHP Version changed from 7.4 to 8.1

Still reproducable in 12.4.15

Actions

Also available in: Atom PDF