Index: trunk/core/units/general/helpers/multilanguage.php =================================================================== diff -u -N -r8104 -r8397 --- trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 8104) +++ trunk/core/units/general/helpers/multilanguage.php (.../multilanguage.php) (revision 8397) @@ -88,8 +88,10 @@ */ function createFields($prefix, $refresh = false) { - if ($refresh) { - $this->Application->HandleEvent( new kEvent($prefix.':OnCreateCustomFields') ); + if ($refresh && preg_match('/(.*)-cdata$/', $prefix, $regs)) { + // call main item config to clone cdata table + $this->Application->UnitConfigReader->loadConfig($regs[1]); + $this->Application->HandleEvent( new kEvent($prefix.':OnAfterConfigRead') ); } $table_name = $this->Application->getUnitOption($prefix, 'TableName'); @@ -128,6 +130,7 @@ $field_mask['type'] = $field_options['db_type']; } $field_mask['default'] = 'DEFAULT '.$default_value; + if (strtoupper($field_mask['type']) == 'TEXT') { // text fields in mysql doesn't have default value $field_mask = $field_mask['name'].' '.$field_mask['type'].' '.$field_mask['null'];