Project

General

Profile

Actions

Bug #100924

open

DataHandler->copyRecord with an CE that uses inline-Relation and sys_file_reference

Added by Ralph Brugger over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2023-05-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:
Stabilization Sprint

Description

DataHandler->copyRecord with an CE that uses inline-Relation and sys_file_reference

We're using an self written extension called RSM-FAQ.
The Extension has an CType plugin rsmfaq_pi1.

The plugin has a inline-relation to a table called tx_rsmfaq_item.

The TCA of the tx_rsmfaq_item defines a field media which adds images to the tx_rsmfaq_item.

This Extension is originally years old and currently runs with TYPO3 11.5.

Situation:
When we copy the CE in the backend everything works fine.

Problem:
We're using a hook in which one rsmfaq_pi1-CE is copied to another (empty) page:

$DataHandler->copyRecord('tt_content', 145733, 23143, false); // FAQ

The CE and the tx_rsmfaq_items are copied correctly.
BUT: The images of the tx_rsmfaq_item will be copied and assigned to the source item, but not the target (copy).

After copying the rsmfaq_pi1-CE, the target CE has the tx_rsmfaq_items but the images are not copied to the target page and not assigned to the target-rsmfaq_pi1-CE.
The images will be copied to the source page and assigned to the source-rsmfaq_pi1-CE.

Is this a problem of the TCA?
Is this a bug?

We're using the same approach in serveral extensions, and the problem is the same.

I'll attach:
ext_tables.sql
Configuration/TCA/tx_rsmfaq_item.php
Configuration/TCA/Overrides/tt_content.php


Files

ext_tables.sql (1.66 KB) ext_tables.sql Ralph Brugger, 2023-05-26 13:22
tt_content.php (2.93 KB) tt_content.php Ralph Brugger, 2023-05-26 13:22
tx_rsmfaq_item.php (8.8 KB) tx_rsmfaq_item.php Ralph Brugger, 2023-05-26 13:22
Actions #1

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to Stabilization Sprint
Actions

Also available in: Atom PDF