Query Inquiry

Hello guys,

I just have this problem when updating a user… it gives out the message," Database failure, please refer to sugarcrm.log"

the problem is in the three Nulls at the end of the query: ,=NULL,=NULL,=NULL,=NULL - I don’t actually know what fields they map
now here is the query from the log:

SET user_name=‘hasanin’,user_hash=’$1$m4nA902D$y7bZ3e3SgVEto.bEj9TYZdP.’,system_generated_password=0,pwd_last_changed=‘2014-11-04 15:13:00’,authenticate_id=NULL,sugar_login=1,first_name=‘Hasanin’,last_name=‘Ahmed’,is_admin=0,external_auth_only=0,receive_notifications=1,description=NULL,date_modified=‘2015-04-28 13:10:24’,modified_user_id=‘1cd0710c-7e77-e748-7ffd-503c903b9ea3’,created_by=‘1cd0710c-7e77-e748-7ffd-503c903b9ea3’,title=NULL,department=NULL,phone_home=NULL,phone_mobile=NULL,phone_work=NULL,phone_other=NULL,phone_fax=NULL,status=‘Inactive’,address_street=NULL,address_city=NULL,address_state=NULL,address_country=NULL,address_postalcode=NULL,portal_only=0,show_on_employees=1,employee_status=‘Terminated’,messenger_id=NULL,messenger_type=NULL,reports_to_id=’’,is_group=0,=NULL,=NULL,=NULL,=NULL

Hi
I had this too, I upgraded from SugarCRM to SuiteCRM …
Before I go into some explanation how to fix this - did you come from SugarCRM?

Jobst

yes upgraded from SugarCRM.

Mine was for opportunities, tasks and contacts - I dunno why.

First thing you should try is to do a DB repair, goto admin -> repair and do

  1. Quick Repair and Rebuild
  2. Rebuild Relationships
  3. Rebuild Minified JS Files
  4. Repair JS Files

I had empty vardef fields (i.e. no name in the vardef specification of the module) there were showing as empty fields in the Studio.
If the above does not help there are some extra steps, but you need to edit some files - it worked for me.

Jobst

1 Like

Thank you so much for your help, sir.

I have done the following steps

Mine was for opportunities, tasks and contacts - I dunno why.

First thing you should try is to do a DB repair, goto admin -> repair and do
Quick Repair and Rebuild
Rebuild Relationships
Rebuild Minified JS Files
Repair JS Files

nothing doing… still i got that dreaded error. Also, i don’t know how to deal with the vardefs thing.

what are the extra steps i should pursue.

thanks again :slight_smile:

Hi

You need to check the content of the following file:

YOUR_SUGAR_INSTALL/cache/modules/Users/Uservardefs.php

and see whether there are some fields in there that have no name set (this was my problem), e.g.


‘fields’ => array(

‘textarea_c’ =>
array (
‘labelValue’ => ‘TEXTAREA’
),

),

then simply stick a ‘fake’ name in there

‘textarea_c’ =>
array (
‘labelValue’ => ‘TEXTAREA’,
‘name’ => ‘FiddlerOnTheRoof’
),

and your problem will go away … but you need to do another DB repair.

CAVEAT:
Now I am not sure where the problem comes from, been using SugarCRM since 2005 as a user/devleoper.
I checked my last install BEFORE I upgraded to SuiteCRM, the vardefs file was OK there.
I also checked whether the vardefs file of the module had a problem - it did not.
I also checked the vardefs file of the module after I upgraded, it does not have a problem.

So why this is happening - I am not sure.

1 Like

Hi,

This is usually caused by partially populated vardefs.

You can try to figure out what fields are causing this by looking in cache/modules/Users/Uservardefs.php.

If you look in custom/Extension/modules/Users/Ext/Vardefs there may be entries causing the issue. In particular look for something like:

$dictionary['User']['fields']['broken_field_c']['labelValue'] = 'Some Label';

In the above if broken_field_c doesn’t exist then a vardef array will be created anyway.

Hope this helps,
Jim

couldn’t do anything… don’t see anything not normail… here is my : cache/modules/Users/Uservardefs.php

<?php $GLOBALS["dictionary"]["User"]=array ( 'table' => 'users', 'fields' => array ( 'id' => array ( 'name' => 'id', 'vname' => 'LBL_ID', 'type' => 'id', 'required' => true, ), 'user_name' => array ( 'name' => 'user_name', 'vname' => 'LBL_USER_NAME', 'type' => 'user_name', 'dbType' => 'varchar', 'len' => '60', 'importable' => 'required', 'required' => true, 'studio' => array ( 'no_duplicate' => true, 'editview' => false, 'detailview' => true, 'quickcreate' => false, 'basic_search' => false, 'advanced_search' => false, ), ), 'user_hash' => array ( 'name' => 'user_hash', 'vname' => 'LBL_USER_HASH', 'type' => 'varchar', 'len' => '255', 'reportable' => false, 'importable' => 'false', 'sensitive' => true, 'studio' => array ( 'no_duplicate' => true, 'listview' => false, 'searchview' => false, ), ), 'system_generated_password' => array ( 'name' => 'system_generated_password', 'vname' => 'LBL_SYSTEM_GENERATED_PASSWORD', 'type' => 'bool', 'required' => true, 'reportable' => false, 'massupdate' => false, 'studio' => array ( 'listview' => false, 'searchview' => false, 'editview' => false, 'quickcreate' => false, ), ), 'pwd_last_changed' => array ( 'name' => 'pwd_last_changed', 'vname' => 'LBL_PSW_MODIFIED', 'type' => 'datetime', 'required' => false, 'massupdate' => false, 'studio' => array ( 'formula' => false, ), ), 'authenticate_id' => array ( 'name' => 'authenticate_id', 'vname' => 'LBL_AUTHENTICATE_ID', 'type' => 'varchar', 'len' => '100', 'reportable' => false, 'importable' => 'false', 'studio' => array ( 'listview' => false, 'searchview' => false, 'related' => false, ), ), 'sugar_login' => array ( 'name' => 'sugar_login', 'vname' => 'LBL_SUGAR_LOGIN', 'type' => 'bool', 'default' => '1', 'reportable' => false, 'massupdate' => false, 'importable' => false, 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'first_name' => array ( 'name' => 'first_name', 'vname' => 'LBL_FIRST_NAME', 'dbType' => 'varchar', 'type' => 'name', 'len' => '30', ), 'last_name' => array ( 'name' => 'last_name', 'vname' => 'LBL_LAST_NAME', 'dbType' => 'varchar', 'type' => 'name', 'len' => '30', 'importable' => 'required', 'required' => true, ), 'full_name' => array ( 'name' => 'full_name', 'rname' => 'full_name', 'vname' => 'LBL_NAME', 'type' => 'name', 'fields' => array ( 0 => 'first_name', 1 => 'last_name', ), 'source' => 'non-db', 'sort_on' => 'last_name', 'sort_on2' => 'first_name', 'db_concat_fields' => array ( 0 => 'first_name', 1 => 'last_name', ), 'len' => '510', 'studio' => array ( 'formula' => false, ), ), 'name' => array ( 'name' => 'name', 'rname' => 'name', 'vname' => 'LBL_NAME', 'type' => 'varchar', 'source' => 'non-db', 'len' => '510', 'db_concat_fields' => array ( 0 => 'first_name', 1 => 'last_name', ), 'importable' => 'false', ), 'is_admin' => array ( 'name' => 'is_admin', 'vname' => 'LBL_IS_ADMIN', 'type' => 'bool', 'default' => '0', 'studio' => array ( 'listview' => false, 'searchview' => false, 'related' => false, ), ), 'external_auth_only' => array ( 'name' => 'external_auth_only', 'vname' => 'LBL_EXT_AUTHENTICATE', 'type' => 'bool', 'reportable' => false, 'massupdate' => false, 'default' => '0', 'studio' => array ( 'listview' => false, 'searchview' => false, 'related' => false, ), ), 'receive_notifications' => array ( 'name' => 'receive_notifications', 'vname' => 'LBL_RECEIVE_NOTIFICATIONS', 'type' => 'bool', 'default' => '1', 'massupdate' => false, 'studio' => false, ), 'description' => array ( 'name' => 'description', 'vname' => 'LBL_DESCRIPTION', 'type' => 'text', ), 'date_entered' => array ( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', 'required' => true, 'studio' => array ( 'editview' => false, 'quickcreate' => false, ), ), 'date_modified' => array ( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', 'required' => true, 'studio' => array ( 'editview' => false, 'quickcreate' => false, ), ), 'modified_user_id' => array ( 'name' => 'modified_user_id', 'rname' => 'user_name', 'id_name' => 'modified_user_id', 'vname' => 'LBL_MODIFIED_BY_ID', 'type' => 'assigned_user_name', 'table' => 'users', 'isnull' => 'false', 'dbType' => 'id', ), 'modified_by_name' => array ( 'name' => 'modified_by_name', 'vname' => 'LBL_MODIFIED_BY', 'type' => 'varchar', 'source' => 'non-db', 'studio' => false, ), 'created_by' => array ( 'name' => 'created_by', 'rname' => 'user_name', 'id_name' => 'modified_user_id', 'vname' => 'LBL_ASSIGNED_TO', 'type' => 'assigned_user_name', 'table' => 'users', 'isnull' => 'false', 'dbType' => 'id', 'studio' => false, ), 'created_by_name' => array ( 'name' => 'created_by_name', 'vname' => 'LBL_CREATED_BY_NAME', 'type' => 'varchar', 'source' => 'non-db', 'importable' => 'false', ), 'title' => array ( 'name' => 'title', 'vname' => 'LBL_TITLE', 'type' => 'varchar', 'len' => '50', ), 'department' => array ( 'name' => 'department', 'vname' => 'LBL_DEPARTMENT', 'type' => 'varchar', 'len' => '50', ), 'phone_home' => array ( 'name' => 'phone_home', 'vname' => 'LBL_HOME_PHONE', 'type' => 'phone', 'dbType' => 'varchar', 'len' => '50', ), 'phone_mobile' => array ( 'name' => 'phone_mobile', 'vname' => 'LBL_MOBILE_PHONE', 'type' => 'phone', 'dbType' => 'varchar', 'len' => '50', ), 'phone_work' => array ( 'name' => 'phone_work', 'vname' => 'LBL_WORK_PHONE', 'type' => 'phone', 'dbType' => 'varchar', 'len' => '50', ), 'phone_other' => array ( 'name' => 'phone_other', 'vname' => 'LBL_OTHER_PHONE', 'type' => 'phone', 'dbType' => 'varchar', 'len' => '50', ), 'phone_fax' => array ( 'name' => 'phone_fax', 'vname' => 'LBL_FAX_PHONE', 'type' => 'phone', 'dbType' => 'varchar', 'len' => '50', ), 'status' => array ( 'name' => 'status', 'vname' => 'LBL_STATUS', 'type' => 'enum', 'len' => 100, 'options' => 'user_status_dom', 'importable' => 'required', 'required' => true, ), 'address_street' => array ( 'name' => 'address_street', 'vname' => 'LBL_ADDRESS_STREET', 'type' => 'varchar', 'len' => '150', ), 'address_city' => array ( 'name' => 'address_city', 'vname' => 'LBL_ADDRESS_CITY', 'type' => 'varchar', 'len' => '100', ), 'address_state' => array ( 'name' => 'address_state', 'vname' => 'LBL_ADDRESS_STATE', 'type' => 'varchar', 'len' => '100', ), 'address_country' => array ( 'name' => 'address_country', 'vname' => 'LBL_ADDRESS_COUNTRY', 'type' => 'varchar', 'len' => 100, ), 'address_postalcode' => array ( 'name' => 'address_postalcode', 'vname' => 'LBL_ADDRESS_POSTALCODE', 'type' => 'varchar', 'len' => '20', ), 'UserType' => array ( 'name' => 'UserType', 'vname' => 'LBL_USER_TYPE', 'type' => 'enum', 'len' => 50, 'options' => 'user_type_dom', 'source' => 'non-db', 'import' => false, 'reportable' => false, 'studio' => array ( 'formula' => false, ), ), 'deleted' => array ( 'name' => 'deleted', 'vname' => 'LBL_DELETED', 'type' => 'bool', 'required' => false, 'reportable' => false, ), 'portal_only' => array ( 'name' => 'portal_only', 'vname' => 'LBL_PORTAL_ONLY_USER', 'type' => 'bool', 'massupdate' => false, 'default' => '0', 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'show_on_employees' => array ( 'name' => 'show_on_employees', 'vname' => 'LBL_SHOW_ON_EMPLOYEES', 'type' => 'bool', 'massupdate' => true, 'importable' => true, 'default' => true, 'studio' => array ( 'formula' => false, ), ), 'employee_status' => array ( 'name' => 'employee_status', 'vname' => 'LBL_EMPLOYEE_STATUS', 'type' => 'varchar', 'function' => array ( 'name' => 'getEmployeeStatusOptions', 'returns' => 'html', 'include' => 'modules/Employees/EmployeeStatus.php', ), 'len' => 100, ), 'messenger_id' => array ( 'name' => 'messenger_id', 'vname' => 'LBL_MESSENGER_ID', 'type' => 'varchar', 'len' => 100, ), 'messenger_type' => array ( 'name' => 'messenger_type', 'vname' => 'LBL_MESSENGER_TYPE', 'type' => 'enum', 'options' => 'messenger_type_dom', 'len' => 100, ), 'calls' => array ( 'name' => 'calls', 'type' => 'link', 'relationship' => 'calls_users', 'source' => 'non-db', 'vname' => 'LBL_CALLS', ), 'meetings' => array ( 'name' => 'meetings', 'type' => 'link', 'relationship' => 'meetings_users', 'source' => 'non-db', 'vname' => 'LBL_MEETINGS', ), 'contacts_sync' => array ( 'name' => 'contacts_sync', 'type' => 'link', 'relationship' => 'contacts_users', 'source' => 'non-db', 'vname' => 'LBL_CONTACTS_SYNC', 'reportable' => false, ), 'reports_to_id' => array ( 'name' => 'reports_to_id', 'vname' => 'LBL_REPORTS_TO_ID', 'type' => 'id', 'required' => false, ), 'reports_to_name' => array ( 'name' => 'reports_to_name', 'rname' => 'last_name', 'id_name' => 'reports_to_id', 'vname' => 'LBL_REPORTS_TO_NAME', 'type' => 'relate', 'isnull' => 'true', 'module' => 'Users', 'table' => 'users', 'link' => 'reports_to_link', 'reportable' => false, 'source' => 'non-db', 'duplicate_merge' => 'disabled', 'side' => 'right', ), 'reports_to_link' => array ( 'name' => 'reports_to_link', 'type' => 'link', 'relationship' => 'user_direct_reports', 'link_type' => 'one', 'side' => 'right', 'source' => 'non-db', 'vname' => 'LBL_REPORTS_TO', ), 'reportees' => array ( 'name' => 'reportees', 'type' => 'link', 'relationship' => 'user_direct_reports', 'link_type' => 'many', 'side' => 'left', 'source' => 'non-db', 'vname' => 'LBL_REPORTS_TO', 'reportable' => false, ), 'email1' => array ( 'name' => 'email1', 'vname' => 'LBL_EMAIL', 'type' => 'varchar', 'function' => array ( 'name' => 'getEmailAddressWidget', 'returns' => 'html', ), 'source' => 'non-db', 'group' => 'email1', 'merge_filter' => 'enabled', 'required' => true, ), 'email_addresses' => array ( 'name' => 'email_addresses', 'type' => 'link', 'relationship' => 'users_email_addresses', 'module' => 'EmailAddress', 'bean_name' => 'EmailAddress', 'source' => 'non-db', 'vname' => 'LBL_EMAIL_ADDRESSES', 'reportable' => false, 'required' => true, ), 'email_addresses_primary' => array ( 'name' => 'email_addresses_primary', 'type' => 'link', 'relationship' => 'users_email_addresses_primary', 'source' => 'non-db', 'vname' => 'LBL_EMAIL_ADDRESS_PRIMARY', 'duplicate_merge' => 'disabled', 'required' => true, ), 'email_link_type' => array ( 'name' => 'email_link_type', 'vname' => 'LBL_EMAIL_LINK_TYPE', 'type' => 'enum', 'options' => 'dom_email_link_type', 'importable' => false, 'reportable' => false, 'source' => 'non-db', 'studio' => false, ), 'aclroles' => array ( 'name' => 'aclroles', 'type' => 'link', 'relationship' => 'acl_roles_users', 'source' => 'non-db', 'side' => 'right', 'vname' => 'LBL_ROLES', ), 'is_group' => array ( 'name' => 'is_group', 'vname' => 'LBL_GROUP_USER', 'type' => 'bool', 'massupdate' => false, 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'c_accept_status_fields' => array ( 'name' => 'c_accept_status_fields', 'rname' => 'id', 'relationship_fields' => array ( 'id' => 'accept_status_id', 'accept_status' => 'accept_status_name', ), 'vname' => 'LBL_LIST_ACCEPT_STATUS', 'type' => 'relate', 'link' => 'calls', 'link_type' => 'relationship_info', 'source' => 'non-db', 'importable' => 'false', 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'm_accept_status_fields' => array ( 'name' => 'm_accept_status_fields', 'rname' => 'id', 'relationship_fields' => array ( 'id' => 'accept_status_id', 'accept_status' => 'accept_status_name', ), 'vname' => 'LBL_LIST_ACCEPT_STATUS', 'type' => 'relate', 'link' => 'meetings', 'link_type' => 'relationship_info', 'source' => 'non-db', 'importable' => 'false', 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'accept_status_id' => array ( 'name' => 'accept_status_id', 'type' => 'varchar', 'source' => 'non-db', 'vname' => 'LBL_LIST_ACCEPT_STATUS', 'importable' => 'false', 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'accept_status_name' => array ( 'name' => 'accept_status_name', 'type' => 'enum', 'source' => 'non-db', 'vname' => 'LBL_LIST_ACCEPT_STATUS', 'options' => 'dom_meeting_accept_status', 'massupdate' => false, 'studio' => array ( 'listview' => false, 'searchview' => false, 'formula' => false, ), ), 'prospect_lists' => array ( 'name' => 'prospect_lists', 'type' => 'link', 'relationship' => 'prospect_list_users', 'module' => 'ProspectLists', 'source' => 'non-db', 'vname' => 'LBL_PROSPECT_LIST', ), 'emails_users' => array ( 'name' => 'emails_users', 'type' => 'link', 'relationship' => 'emails_users_rel', 'module' => 'Emails', 'source' => 'non-db', 'vname' => 'LBL_EMAILS', ), 'holidays' => array ( 'name' => 'holidays', 'type' => 'link', 'relationship' => 'users_holidays', 'source' => 'non-db', 'side' => 'right', 'vname' => 'LBL_HOLIDAYS', ), 'eapm' => array ( 'name' => 'eapm', 'type' => 'link', 'relationship' => 'eapm_assigned_user', 'vname' => 'LBL_ASSIGNED_TO_USER', 'source' => 'non-db', ), 'oauth_tokens' => array ( 'name' => 'oauth_tokens', 'type' => 'link', 'relationship' => 'oauthtokens_assigned_user', 'vname' => 'LBL_OAUTH_TOKENS', 'link_type' => 'one', 'module' => 'OAuthTokens', 'bean_name' => 'OAuthToken', 'source' => 'non-db', 'side' => 'left', ), 'project_resource' => array ( 'name' => 'project_resource', 'type' => 'link', 'relationship' => 'projects_users_resources', 'source' => 'non-db', 'vname' => 'LBL_PROJECTS', ), 'enjay_relate_account_c' => array ( 'duplicate_merge_dom_value' => 0, ), 'enjay_call_notification_c' => array ( 'duplicate_merge_dom_value' => 0, ), 'enjay_lastcall_c' => array ( 'duplicate_merge_dom_value' => 0, ), 'enjay_relate_contact_c' => array ( 'duplicate_merge_dom_value' => 0, ), 'SecurityGroups' => array ( 'name' => 'SecurityGroups', 'type' => 'link', 'relationship' => 'securitygroups_users', 'source' => 'non-db', 'module' => 'SecurityGroups', 'bean_name' => 'SecurityGroup', 'vname' => 'LBL_SECURITYGROUPS', ), 'securitygroup_noninher_fields' => array ( 'name' => 'securitygroup_noninher_fields', 'rname' => 'id', 'relationship_fields' => array ( 'id' => 'securitygroup_noninherit_id', 'noninheritable' => 'securitygroup_noninheritable', 'primary_group' => 'securitygroup_primary_group', ), 'vname' => 'LBL_USER_NAME', 'type' => 'relate', 'link' => 'SecurityGroups', 'link_type' => 'relationship_info', 'source' => 'non-db', 'Importable' => false, 'duplicate_merge' => 'disabled', ), 'securitygroup_noninherit_id' => array ( 'name' => 'securitygroup_noninherit_id', 'type' => 'varchar', 'source' => 'non-db', 'vname' => 'LBL_securitygroup_noninherit_id', ), 'securitygroup_noninheritable' => array ( 'name' => 'securitygroup_noninheritable', 'type' => 'bool', 'source' => 'non-db', 'vname' => 'LBL_SECURITYGROUP_NONINHERITABLE', ), 'securitygroup_primary_group' => array ( 'name' => 'securitygroup_primary_group', 'type' => 'bool', 'source' => 'non-db', 'vname' => 'LBL_PRIMARY_GROUP', ), 'asterisk_outbound_c' => array ( 'required' => false, 'source' => 'custom_fields', 'name' => 'asterisk_outbound_c', 'vname' => 'LBL_ASTERISK_OUTBOUND', 'type' => 'bool', 'massupdate' => '0', 'default' => '0', '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' => '45', 'size' => '20', 'id' => 'Usersasterisk_outbound_c', 'custom_module' => 'Users', ), 'asterisk_inbound_c' => array ( 'required' => false, 'source' => 'custom_fields', 'name' => 'asterisk_inbound_c', 'vname' => 'LBL_ASTERISK_INBOUND', 'type' => 'bool', 'massupdate' => '0', 'default' => '0', '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' => '45', 'size' => '20', 'id' => 'Usersasterisk_inbound_c', 'custom_module' => 'Users', ), 'asterisk_ext_c' => array ( 'required' => false, 'source' => 'custom_fields', 'name' => 'asterisk_ext_c', 'vname' => 'LBL_ASTERISK_EXT', 'type' => 'varchar', 'massupdate' => '0', 'default' => NULL, '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' => '45', 'size' => '20', 'id' => 'Usersasterisk_ext_c', 'custom_module' => 'Users', ), ), 'indices' => array ( 0 => array ( 'name' => 'userspk', 'type' => 'primary', 'fields' => array ( 0 => 'id', ), ), 1 => array ( 'name' => 'idx_user_name', 'type' => 'index', 'fields' => array ( 0 => 'user_name', 1 => 'is_group', 2 => 'status', 3 => 'last_name', 4 => 'first_name', 5 => 'id', ), ), ), 'relationships' => array ( 'user_direct_reports' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'Users', 'rhs_table' => 'users', 'rhs_key' => 'reports_to_id', 'relationship_type' => 'one-to-many', ), 'users_users_signatures' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'UserSignature', 'rhs_table' => 'users_signatures', 'rhs_key' => 'user_id', 'relationship_type' => 'one-to-many', ), 'users_email_addresses' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EmailAddresses', 'rhs_table' => 'email_addresses', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'email_addr_bean_rel', 'join_key_lhs' => 'bean_id', 'join_key_rhs' => 'email_address_id', 'relationship_role_column' => 'bean_module', 'relationship_role_column_value' => 'Users', ), 'users_email_addresses_primary' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EmailAddresses', 'rhs_table' => 'email_addresses', 'rhs_key' => 'id', 'relationship_type' => 'many-to-many', 'join_table' => 'email_addr_bean_rel', 'join_key_lhs' => 'bean_id', 'join_key_rhs' => 'email_address_id', 'relationship_role_column' => 'primary_address', 'relationship_role_column_value' => '1', ), ), 'custom_fields' => true, );

Jim
can you merge this as this is a double up with https://suitecrm.com/forum/bug-tracker/4747-query-challenge
Initially the (same) person opened two topics in two different forums.
I answered this in a similar fashion.
Jobst

Since the only fields I can see in your Users Vardef that are different you could uninstall and re-install asterisk?

But before you do make a backup of the DB and the Filesystem, so you can get back where you left off (basically no harm done) … this might be worth a try and does not take long to do…

Also I checked my filesystem when I had the problem (from a backup) and there was no hint of any faulty $dictionary[‘User’][‘fields’][‘broken_field_c’][‘labelValue’] = ‘Some Label’;

Jobst

Hi akrum,

The faulty fields are the following:


            'enjay_relate_account_c' =>
                array (
                    'duplicate_merge_dom_value' => 0,
                ),
            'enjay_call_notification_c' =>
                array (
                    'duplicate_merge_dom_value' => 0,
                ),
            'enjay_lastcall_c' =>
                array (
                    'duplicate_merge_dom_value' => 0,
                ),
            'enjay_relate_contact_c' =>
                array (
                    'duplicate_merge_dom_value' => 0,
                ),

These don’t have names defined so are causing the issues. If you search your codebase for these you will likely find the cause.

Thanks,
Jim

I looked at the vardef twice, I did not see those fields … that’s scary.

This might help: https://sugarexchange.sugarcrm.com/apps/21863#!overview

Jobst