Index: custom_data/custom_data_event_handler.php =================================================================== --- custom_data/custom_data_event_handler.php (revision 12650) +++ custom_data/custom_data_event_handler.php (working copy) @@ -55,7 +55,7 @@ return false; } - if (!$custom_fields || (defined('IS_INSTALL') && IS_INSTALL)) { + if (!$custom_fields || (defined('IS_INSTALL') && IS_INSTALL) || (defined('CUSTOM_FIELD_ADDED') && CUSTOM_FIELD_ADDED)) { // query all custom fields at once -> saves 4 sqls queries $sql = 'SELECT * FROM '.TABLE_PREFIX.'CustomField'; Index: custom_fields/custom_fields_event_handler.php =================================================================== --- custom_fields/custom_fields_event_handler.php (revision 12650) +++ custom_fields/custom_fields_event_handler.php (working copy) @@ -30,6 +30,7 @@ $section = $this->Application->getUnitOption($main_prefix.'.custom', 'PermSection'); $event->setEventParam('PermSection', $section); + return parent::CheckPermission($event); } @@ -188,6 +189,7 @@ /* @var $ml_helper kMultiLanguageHelper */ // call main item config to clone cdata table + define('CUSTOM_FIELD_ADDED', 1); // used in cdata::scanCustomFields method $this->Application->getUnitOption($main_prefix, 'TableName'); $ml_helper->createFields($main_prefix.'-cdata'); }