Error retrieving Contact list: Query Failed:

Hi All,
I got below error in sugar log file.

Thu Apr 23 18:49:08 2015 [11995][5466e1bd-9a95-f560-9779-55378cd2244f][FATAL] Error retrieving Contact list:  Query Failed:  SELECT  contacts.* ,contacts_cstm.alt_address_other_city_c,contacts_cstm.alt_address_other_state_c,contacts_cstm.display_status_c,contacts_cstm.contact_type_c,contacts_cstm.skype_id_c,contacts_cstm.primary_address_other_state_c,contacts_cstm.primary_address_other_city_c, LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')))) as name , jt0.user_name modified_by_name , jt0.created_by modified_by_name_owner  , 'Users' modified_by_name_mod , jt1.user_name created_by_name , jt1.created_by created_by_name_owner  , 'Users' created_by_name_mod , jt2.user_name assigned_user_name , jt2.created_by assigned_user_name_owner  , 'Users' assigned_user_name_mod, LTRIM(RTRIM(CONCAT(IFNULL(contacts.first_name,''),' ',IFNULL(contacts.last_name,'')))) as full_name, '                                                                                                                                                                                                                                                              ' account_name , '                                    '  account_id , '                                                                                                                                                                                                                                                              ' opportunity_role_fields , '                                    '  opportunity_id  , jt5.last_name report_to_name , jt5.assigned_user_id report_to_name_owner  , 'Contacts' report_to_name_mod , jt6.name campaign_name , jt6.assigned_user_id campaign_name_owner  , 'Campaigns' campaign_name_mod, '                                                                                                                                                                                                                                                              ' c_accept_status_fields , '                                    '  call_id , '                                                                                                                                                                                                                                                              ' m_accept_status_fields , '                                    '  meeting_id  FROM contacts  LEFT JOIN contacts_cstm ON contacts.id = contacts_cstm.id_c   LEFT JOIN  users jt0 ON contacts.modified_user_id=jt0.id AND jt0.deleted=0

 AND jt0.deleted=0  LEFT JOIN  users jt1 ON contacts.created_by=jt1.id AND jt1.deleted=0

 AND jt1.deleted=0  LEFT JOIN  users jt2 ON contacts.assigned_user_id=jt2.id AND jt2.deleted=0

 AND jt2.deleted=0  LEFT JOIN  contacts jt5 ON contacts.reports_to_id=jt5.id AND jt5.deleted=0

 AND jt5.deleted=0  LEFT JOIN  campaigns jt6 ON contacts.campaign_id=jt6.id AND jt6.deleted=0

 AND jt6.deleted=0 where ((contacts.name like 'prat%') AND ( contacts.assigned_user_id ='5466e1bd-9a95-f560-9779-55378cd2244f'  or  EXISTS (SELECT  1
                  FROM    securitygroups secg
                          INNER JOIN securitygroups_users secu 
                            ON secg.id = secu.securitygroup_id 
                               AND secu.deleted = 0 
                               AND secu.user_id = '5466e1bd-9a95-f560-9779-55378cd2244f'
                          INNER JOIN securitygroups_records secr 
                            ON secg.id = secr.securitygroup_id 
                               AND secr.deleted = 0 
                               AND secr.module = 'Contacts'
                       WHERE   secr.record_id = contacts.id
                               AND secg.deleted = 0) ) ) AND contacts.deleted=0 ORDER BY contacts.last_name LIMIT 0,10: MySQL error 1054: Unknown column 'contacts.name' in 'where clause'
Thu Apr 23 18:49:08 2015 [12014][5466e1bd-9a95-f560-9779-55378cd2244f][FATAL] fp_events_contacts for fp_events_contacts failed to load

Thu Apr 23 18:49:08 2015 [12014][5466e1bd-9a95-f560-9779-55378cd2244f][FATAL] fp_events_contacts for fp_events_contacts failed to load

Kindly give me solution to fix.

Hello,

I am not sure from where query got generated, but it seems wrong.
In query it should be contacts.first_name or contacts.last_name not the contacts.name
Do you have any customization in listview ?

Hello,
Thanks,
I not have any custom code in contacts module.

Do try quick repair & rebuild and also do rebuild relationship from admin.

It may help you.