Index: branches/unlabeled/unlabeled-1.25.2/core/kernel/utility/temp_handler.php =================================================================== diff -u -r5858 -r5862 --- branches/unlabeled/unlabeled-1.25.2/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 5858) +++ branches/unlabeled/unlabeled-1.25.2/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 5862) @@ -505,7 +505,7 @@ $this->saveID($master['Prefix'], '', $insert_id); $this->RaiseEvent( 'OnAfterCopyToLive', $master['Prefix'], '', Array($insert_id), null, array('temp_id' => $id) ); - $this->UpdateForeignKeys($master, $insert_id, $id); + $this->UpdateForeignKeys($master, $insert_id, $id_to_copy); //delete already copied record from master temp table $query = 'DELETE FROM '.$this->GetTempName($master['TableName']).'