#100924DataHandler->copyRecord with an CE that uses inline-Relation and sys_file_reference
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
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 3
History 2
-
Benni Mack changed Sprint Focus Stabilization Sprint <span data-processor="relativetime" data-value="2023-06-06T12:50:00+00:00" > 06/06/23, 12:50 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-03T04:38:35+00:00" > 10/03/26, 04:38 </span>
Hey,
thanks for your issue. closing it as it rather old and probably because of wrong usage of API.
proper way would be
The correction of IDs happens at a very last point in
remapListedDBRecords()andprocessRemapStack()and using a customcopyRecordin the middle of copying prohibits that.