Index: branches/5.0.x/core/kernel/utility/temp_handler.php =================================================================== diff -u -N -r12776 -r12783 --- branches/5.0.x/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 12776) +++ branches/5.0.x/core/kernel/utility/temp_handler.php (.../temp_handler.php) (revision 12783) @@ -1,6 +1,6 @@ RaiseEvent('OnBeforeClone', $master['Prefix'], $special, Array($object->GetId()), $foreign_key); } + $object->inCloning = true; $res = $mode == 'update' ? $object->Update() : $object->Create(); + $object->inCloning = false; if ($res) { Index: branches/5.0.x/core/kernel/db/dbitem.php =================================================================== diff -u -N -r12734 -r12783 --- branches/5.0.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 12734) +++ branches/5.0.x/core/kernel/db/dbitem.php (.../dbitem.php) (revision 12783) @@ -1,6 +1,6 @@ customFields) { + if (!$this->customFields || $this->inCloning) { return true; } Index: branches/5.0.x/core/units/custom_data/custom_data_config.php =================================================================== diff -u -N -r12734 -r12783 --- branches/5.0.x/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 12734) +++ branches/5.0.x/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 12783) @@ -1,6 +1,6 @@ 'ResourceId', 'ForeignKey' => 'ResourceId', 'AutoDelete' => true, - 'AutoClone' => false, + 'AutoClone' => true, 'CalculatedFields' => Array ( '' => Array(),