Where is the vardef file stored for a field created in Studio?
In attempting to answer that question for myself, I used Studio to create a field with an unusual name (wierdname) and then did a Quick Repair and Rebuild
To see where the vardef field definition is stored, I then used
cd {root of SuiteCRM system}
grep -R wierdname .
The response to that was
grep -R wierdname .
./cache/modules/AYU_Projects/language/en_us.lang.php: 'LBL_WIERDNAME' => 'A very wierdname',
./cache/modules/AYU_Projects/AYU_Projectsvardefs.php: 'wierdname_c' =>
./cache/modules/AYU_Projects/AYU_Projectsvardefs.php: 'labelValue' => 'A very wierdname',
./cache/modules/AYU_Projects/AYU_Projectsvardefs.php: 'name' => 'wierdname_c',
./cache/modules/AYU_Projects/AYU_Projectsvardefs.php: 'id' => 'AYU_Projectswierdname_c',
./custom/Extension/modules/AYU_Projects/Ext/Vardefs/_override_sugarfield_wierdname_c.php:$dictionary['AYU_Projects']['fields']['wierdname_c']['inline_edit']='';
./custom/Extension/modules/AYU_Projects/Ext/Vardefs/_override_sugarfield_wierdname_c.php:$dictionary['AYU_Projects']['fields']['wierdname_c']['labelValue']='A very wierdname';
./custom/Extension/modules/AYU_Projects/Ext/Language/_override_en_us.lang.php:$mod_strings['LBL_WIERDNAME'] = 'A very wierdname';
./custom/modules/AYU_Projects/Ext/Vardefs/vardefs.ext.php:$dictionary['AYU_Projects']['fields']['wierdname_c']['inline_edit']='';
./custom/modules/AYU_Projects/Ext/Vardefs/vardefs.ext.php:$dictionary['AYU_Projects']['fields']['wierdname_c']['labelValue']='A very wierdname';
./custom/modules/AYU_Projects/Ext/Language/en_us.lang.ext.php:$mod_strings['LBL_WIERDNAME'] = 'A very wierdname';
If this is the complete list (which it should be, given how grep operates), the actual vardef for the new field is ONLY stored in the cache directory in cache/modules/{module_name}/{modulename}vardefs.php
The customizations for the field (Label, InLineEdit, ā¦) are stored in the custom/⦠folders, but NOT the actual field definition, which is only stored in the cache directory
'wierdname_c' =>
array (
'inline_edit' => '',
'labelValue' => 'A very wierdname',
'required' => false,
'source' => 'custom_fields',
'name' => 'wierdname_c',
'vname' => 'LBL_WIERDNAME',
'type' => 'varchar',
'massupdate' => '0',
'default' => '',
'no_default' => false,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'unified_search' => false,
'merge_filter' => 'disabled',
'len' => '255',
'size' => '20',
'id' => 'AYU_Projectswierdname_c',
'custom_module' => 'AYU_Projects',
),
I thought a cache folder kept COPIES of information to make it quick to access, but if the above is true, then for SuiteCRM, if the cache folder is ādisturbedā, the system cannot fully recover since there is nowhere else to get some of the information (like the vardef of a field created in Studio).
I did check other posts in the forum, and there was a very detailed (old but detailed) explanation of the cache directory at
However, according to that post, I should be able to delete most of the contents of the cache/modules/{modulename) directory, so long as I leave alone the cache/modules/emails directory. But if the above is true then there is more at risk that just the cache/modules/emails directory in cache/modules
So maybe I am missing something
Can someone please clarify?