Index: trunk/core/kernel/db/dbitem.php =================================================================== diff -u -N -r8481 -r8563 --- trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 8481) +++ trunk/core/kernel/db/dbitem.php (.../dbitem.php) (revision 8563) @@ -979,15 +979,18 @@ } $cdata_key = rtrim($this->Prefix.'-cdata.'.$this->Special, '.'); - $cdata =& $this->Application->recallObject($cdata_key, null, Array('skip_autoload' => true)); + $cdata =& $this->Application->recallObject($cdata_key, null, Array('skip_autoload' => true, 'populate_ml_fields' => true)); $resource_id = $this->GetDBField('ResourceId'); $cdata->Load($resource_id, 'ResourceId'); $cdata->SetDBField('ResourceId', $resource_id); $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); + /* @var $ml_formatter kMultiLanguage */ + foreach ($this->customFields as $custom_id => $custom_name) { - $cdata->SetDBField($ml_formatter->LangFieldName('cust_'.$custom_id), $this->GetDBField('cust_'.$custom_name)); + $force_primary = isset($cdata->Fields['cust_'.$custom_id]['force_primary']) && $cdata->Fields['cust_'.$custom_id]['force_primary']; + $cdata->SetDBField($ml_formatter->LangFieldName('cust_'.$custom_id, $force_primary), $this->GetDBField('cust_'.$custom_name)); } if ($cdata->isLoaded()) {