Issue Bug Closed

#92292Set reference to an element - paste records

Michelle Dünner-Meli 09/11/20, 15:47 updated 12/02/25, 14:36

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

Reviews 3

Files 2

History 710

  1. Andreas Kießling commented <span data-processor="relativetime" data-value="2020-09-15T17:26:18+00:00" > 09/15/20, 17:26 </span>

    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. Frank Müller commented and changed PHP Version 7.4 <span data-processor="relativetime" data-value="2021-11-19T13:56:06+00:00" > 11/19/21, 13:56 </span>

    Bug is still reproducable in 10.4.21

  3. Heinz Schilling commented and changed TYPO3 Version 10 12 PHP Version 7.4 8.1 <span data-processor="relativetime" data-value="2024-05-27T11:41:34+00:00" > 05/27/24, 11:41 </span>

    Still reproducable in 12.4.15

  4. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-07T13:05:09+00:00" > 04/07/25, 13:05 </span>

    Applied in changeset commit:e68f565a7f423efb456b01194e7fbd6a126a1662.