[TYPO3-core] Conceptional problem with inline records?
alexander.stehlik at gmail.com
Mon Dec 23 17:43:11 CET 2013
I think I found a solution :)
Am 23.12.2013 12:25, schrieb Alexander Stehlik:
> Hi guys,
> I'm not sure but I think I found a conceptional problem with inline
> records that are stored in the same page as their parents.
> I found this by researching the cause of:
> http://forge.typo3.org/issues/44795 and
> Lets assume we have a page with a tt_content element that uses a
> sys_file_reference. We now copy that page. This is what happens:
> DataHandler->copySpecificPage() loops over all configured tables and
> copies the records in that page.
> If sys_file_reference appears first in the tables array (which seems to
> be the case currently) the sys_file_reference record is copied (a new
> record with identical data but a different PID appears in the
> sys_file_reference table). The records still points to the content
> element in the old page though.
> Now the tt_content element is copied which has a reference to an inline
> sys_file_reference record. This is done by
> copyRecord_procBasedOnFieldType() which finally calls copyRecord_raw().
> In this method it is checked, if the record is already copied by calling
> isRecordCopied(). Since the record WAS already copied further processing
> is skipped.
> Has anyone a good idea how to solve this? Maybe in copyRecord_raw()
> override the data of the related record isRecordCopied() returns TRUE?
> I wish you all a merry Christmas :)
More information about the TYPO3-team-core