[TYPO3-core] RFC: Bug 5718: IRRE - Copying a page with related child records leads to duplicates of each children

Franz Holzinger franz at fholzinger.com
Tue Jun 12 09:53:17 CEST 2007


Hello Oliver, 

>> copyRecord_procBasedOnFieldType($table,$uid,$field,$value,$row,$conf,$realDe
> 
> This function wasn't changed in the patch sent for this RFC. 
> 
>> I think this never will be reached when MM has been set, because it
>> always goes to the first if.
> 
> Yes, because there are different ways of building relations and the
> disposal of intermediate tables. In IRRE these releational information
> can be stored on tables with a proper TCA definition - regular MM tables
> don't have uid and pid for example. 
> 
> If you are sure it's a bug, please open a new issue in the bugtracker.

I have opened a new incident:
http://bugs.typo3.org/view.php?id=5778 

// Avoid duplicates while copying (e.g. when IRRE children were already 
copied):
+						if (!isset($this->copyMappingArray[$table][$row['uid']])) {
+							$this->copyRecord($table,$row['uid'], $theNewRootID);	// Copying 
each of the underlying records...
+						} 

I think this if to avoid duplicate copies should be moved inside of the 
first if of the copyRecord function:
In no circumstances a duplicate copy of the same will be needed. Or the 
contents of $this->copyMappingArray would be wrong. 


copyRecord($table,$uid,$destPid,$first=0,$overrideValues=array(),$excludeFie 
lds='')	{
		global $TCA; 

		$uid = $origUid = intval($uid);
		if ($TCA[$table] && $uid)	{
			t3lib_div::loadTCA($table); 


 - Franz


More information about the TYPO3-team-core mailing list