Monday, May 23, 2016

sugercrm error Warning: Creating default object from empty value in C:\xampp\htdocs\suger\modules\ModuleBuilder\views\view.modulefield.php on line 151 {"east":{"title":"Edit Field","crumb":"","content":" <\/div>\n\n

When u install a fresh sugercrm. When you go to studio and create the new field in the sugercrm you get error

Warning: Creating default object from empty value in C:\xampp\htdocs\suger\modules\ModuleBuilder\views\view.modulefield.php on line 151 {"east":{"title":"Edit Field","crumb":"","content":" <\/div>\n\n

For this error

Please replace the following to following one

$objectName = BeanFactory::getObjectName($moduleName);
            $module = BeanFactory::getBean($moduleName);

            VardefManager::loadVardef($moduleName, $objectName,true);
            global $dictionary;
 $module->mbvardefs->vardefs =  $dictionary[$objectName];



Replace With


$objectName = BeanFactory::getObjectName($moduleName);
            $module = BeanFactory::getBean($moduleName);

            VardefManager::loadVardef($moduleName, $objectName,true);
            global $dictionary;
if(!isset($module->mbvardefs) || is_null($module->mbvardefs)) {
   $module->mbvardefs = new stdClass();
    }
            $module->mbvardefs->vardefs =  $dictionary[$objectName];

No comments:

Post a Comment