Bug #100924
openDataHandler->copyRecord with an CE that uses inline-Relation and sys_file_reference
0%
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