CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • contact_type Error in log file after installing
Pages: [1]

Author Topic: contact_type Error in log file after installing  (Read 1796 times)

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
contact_type Error in log file after installing
November 15, 2012, 07:59:20 am
After installing CiviCRM, whenever I try to add a contact, or do a search or do anything that has contact information used, I get a DB Error: no such field error on my screen. Here is a sample of the log file:


Code: [Select]
Nov 15 15:47:46  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contact_type`, civicrm_contact.contact_sub_type as `contact_sub_type`, civicrm_contact.sort_name as `sort_name`, civicrm_contact.display_name as `display_name`, civicrm_contact.id as us_contact_id, civicrm_contact.do_not_email as `do_not_email`, civicrm_contact.do_not_phone as `do_not_phone`, civicrm_contact.do_not_mail as `do_not_mail`, civicrm_contact.do_not_sms as `do_not_sms`, civicrm_contact.do_not_trade as `do_not_trade`, civicrm_contact.is_opt_out as `is_opt_out`, civicrm_contact.legal_identifier as `legal_identifier`, civicrm_contact.external_identifier as `external_identifier`, civicrm_contact.nick_name as `nick_name`, civicrm_contact.legal_name as `legal_name`, civicrm_contact.image_URL as `image_URL`, civicrm_contact.preferred_mail_format as `preferred_mail_format`, civicrm_contact.first_name as `first_name`, civicrm_contact.middle_name as `middle_name`, civicrm_contact.last_name as `last_name`, civicrm_contact.job_title as `job_title`, civicrm_contact.birth_date as `birth_date`, civicrm_contact.is_deceased as `is_deceased`, civicrm_contact.deceased_date as `deceased_date`, civicrm_contact.household_name as `household_name`, civicrm_contact.organization_name as `organization_name`, civicrm_contact.sic_code as `sic_code`, civicrm_contact.is_deleted as `contact_is_deleted`, gender.value as gender_id, gender.label as gender, individual_prefix.value as individual_prefix_id, individual_prefix.label as individual_prefix, individual_suffix.value as individual_suffix_id, individual_suffix.label as individual_suffix, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_address.id as us_address_id, civicrm_address.street_address as `street_address`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_state_province.id as us_state_province_id, civicrm_state_province.abbreviation as `state_province`, civicrm_state_province.name as state_province_name, civicrm_country.id as us_country_id, civicrm_country.name as `country`, civicrm_phone.id as us_phone_id, civicrm_phone.phone_type_id as phone_type_id, civicrm_phone.phone as `phone`, civicrm_email.id as us_email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_im.id as us_im_id, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_worldregion.id as us_worldregion_id, civicrm_worldregion.name as `world_region`  FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)  LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id  LEFT JOIN civicrm_option_group option_group_gender ON (option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (contact_a.gender_id = gender.value AND option_group_gender.id = gender.option_group_id)  LEFT JOIN civicrm_option_group option_group_prefix ON (option_group_prefix.name = 'individual_prefix') LEFT JOIN civicrm_option_value individual_prefix ON (contact_a.prefix_id = individual_prefix.value AND option_group_prefix.id = individual_prefix.option_group_id )  LEFT JOIN civicrm_option_group option_group_suffix ON (option_group_suffix.name = 'individual_suffix') LEFT JOIN civicrm_option_value individual_suffix ON (contact_a.suffix_id = individual_suffix.value AND option_group_suffix.id = individual_suffix.option_group_id )  WHERE (contact_a.is_deleted = 0) AND contact_a.id IN ( 53,43,20,39,33,94,99,95,82,31,21,71,49,29,14,66,88,51,64,6,54,92,1,12,90,91,81,86,85,69,9,59,26,97,101,55,30,89,37,2,50,45,98,62,23,74,83,76,15,11 )    GROUP BY contact_a.id  ORDER BY contact_a.sort_name asc, contact_a.id  [nativecode=1054 ** Unknown column 'civicrm_contact.contact_type' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contact_type`, civicrm_contact.contact_sub_type as `contact_sub_type`, civicrm_contact.sort_name as `sort_name`, civicrm_contact.display_name as `display_name`, civicrm_contact.id as us_contact_id, civicrm_contact.do_not_email as `do_not_email`, civicrm_contact.do_not_phone as `do_not_phone`, civicrm_contact.do_not_mail as `do_not_mail`, civicrm_contact.do_not_sms as `do_not_sms`, civicrm_contact.do_not_trade as `do_not_trade`, civicrm_contact.is_opt_out as `is_opt_out`, civicrm_contact.legal_identifier as `legal_identifier`, civicrm_contact.external_identifier as `external_identifier`, civicrm_contact.nick_name as `nick_name`, civicrm_contact.legal_name as `legal_name`, civicrm_contact.image_URL as `image_URL`, civicrm_contact.preferred_mail_format as `preferred_mail_format`, civicrm_contact.first_name as `first_name`, civicrm_contact.middle_name as `middle_name`, civicrm_contact.last_name as `last_name`, civicrm_contact.job_title as `job_title`, civicrm_contact.birth_date as `birth_date`, civicrm_contact.is_deceased as `is_deceased`, civicrm_contact.deceased_date as `deceased_date`, civicrm_contact.household_name as `household_name`, civicrm_contact.organization_name as `organization_name`, civicrm_contact.sic_code as `sic_code`, civicrm_contact.is_deleted as `contact_is_deleted`, gender.value as gender_id, gender.label as gender, individual_prefix.value as individual_prefix_id, individual_prefix.label as individual_prefix, individual_suffix.value as individual_suffix_id, individual_suffix.label as individual_suffix, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_address.id as us_address_id, civicrm_address.street_address as `street_address`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_state_province.id as us_state_province_id, civicrm_state_province.abbreviation as `state_province`, civicrm_state_province.name as state_province_name, civicrm_country.id as us_country_id, civicrm_country.name as `country`, civicrm_phone.id as us_phone_id, civicrm_phone.phone_type_id as phone_type_id, civicrm_phone.phone as `phone`, civicrm_email.id as us_email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_im.id as us_im_id, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_worldregion.id as us_worldregion_id, civicrm_worldregion.name as `world_region`  FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)  LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id  LEFT JOIN civicrm_option_group option_group_gender ON (option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (contact_a.gender_id = gender.value AND option_group_gender.id = gender.option_group_id)  LEFT JOIN civicrm_option_group option_group_prefix ON (option_group_prefix.name = 'individual_prefix') LEFT JOIN civicrm_option_value individual_prefix ON (contact_a.prefix_id = individual_prefix.value AND option_group_prefix.id = individual_prefix.option_group_id )  LEFT JOIN civicrm_option_group option_group_suffix ON (option_group_suffix.name = 'individual_suffix') LEFT JOIN civicrm_option_value individual_suffix ON (contact_a.suffix_id = individual_suffix.value AND option_group_suffix.id = individual_suffix.option_group_id )  WHERE (contact_a.is_deleted = 0) AND contact_a.id IN ( 53,43,20,39,33,94,99,95,82,31,21,71,49,29,14,66,88,51,64,6,54,92,1,12,90,91,81,86,85,69,9,59,26,97,101,55,30,89,37,2,50,45,98,62,23,74,83,76,15,11 )    GROUP BY contact_a.id  ORDER BY contact_a.sort_name asc, contact_a.id  [nativecode=1054 ** Unknown column 'civicrm_contact.contact_type' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contact_type`, civicrm_contact.contact_sub_type as `contact_sub_type`, civicrm_contact.sort_name as `sort_name`, civicrm_contact.display_name as `display_name`, civicrm_contact.id as us_contact_id, civicrm_contact.do_not_email as `do_not_email`, civicrm_contact.do_not_phone as `do_not_phone`, civicrm_contact.do_not_mail as `do_not_mail`, civicrm_contact.do_not_sms as `do_not_sms`, civicrm_contact.do_not_trade as `do_not_trade`, civicrm_contact.is_opt_out as `is_opt_out`, civicrm_contact.legal_identifier as `legal_identifier`, civicrm_contact.external_identifier as `external_identifier`, civicrm_contact.nick_name as `nick_name`, civicrm_contact.legal_name as `legal_name`, civicrm_contact.image_URL as `image_URL`, civicrm_contact.preferred_mail_format as `preferred_mail_format`, civicrm_contact.first_name as `first_name`, civicrm_contact.middle_name as `middle_name`, civicrm_contact.last_name as `last_name`, civicrm_contact.job_title as `job_title`, civicrm_contact.birth_date as `birth_date`, civicrm_contact.is_deceased as `is_deceased`, civicrm_contact.deceased_date as `deceased_date`, civicrm_contact.household_name as `household_name`, civicrm_contact.organization_name as `organization_name`, civicrm_contact.sic_code as `sic_code`, civicrm_contact.is_deleted as `contact_is_deleted`, gender.value as gender_id, gender.label as gender, individual_prefix.value as individual_prefix_id, individual_prefix.label as individual_prefix, individual_suffix.value as individual_suffix_id, individual_suffix.label as individual_suffix, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_address.id as us_address_id, civicrm_address.street_address as `street_address`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_state_province.id as us_state_province_id, civicrm_state_province.abbreviation as `state_province`, civicrm_state_province.name as state_province_name, civicrm_country.id as us_country_id, civicrm_country.name as `country`, civicrm_phone.id as us_phone_id, civicrm_phone.phone_type_id as phone_type_id, civicrm_phone.phone as `phone`, civicrm_email.id as us_email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_im.id as us_im_id, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_worldregion.id as us_worldregion_id, civicrm_worldregion.name as `world_region`  FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)  LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id  LEFT JOIN civicrm_option_group option_group_gender ON (option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (contact_a.gender_id = gender.value AND option_group_gender.id = gender.option_group_id)  LEFT JOIN civicrm_option_group option_group_prefix ON (option_group_prefix.name = 'individual_prefix') LEFT JOIN civicrm_option_value individual_prefix ON (contact_a.prefix_id = individual_prefix.value AND option_group_prefix.id = individual_prefix.option_group_id )  LEFT JOIN civicrm_option_group option_group_suffix ON (option_group_suffix.name = 'individual_suffix') LEFT JOIN civicrm_option_value individual_suffix ON (contact_a.suffix_id = individual_suffix.value AND option_group_suffix.id = individual_suffix.option_group_id )  WHERE (contact_a.is_deleted = 0) AND contact_a.id IN ( 53,43,20,39,33,94,99,95,82,31,21,71,49,29,14,66,88,51,64,6,54,92,1,12,90,91,81,86,85,69,9,59,26,97,101,55,30,89,37,2,50,45,98,62,23,74,83,76,15,11 )    GROUP BY contact_a.id  ORDER BY contact_a.sort_name asc, contact_a.id  [nativecode=1054 ** Unknown column 'civicrm_contact.contact_type' in 'field list']"]
)


Nov 15 15:47:46  [info] $backTrace = #0 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /www/civicrm/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /www/civicrm/sites/all/modules/civicrm/packages/DB.php(968): PEAR_Error->PEAR_Error("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#4 /www/civicrm/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#5 /www/civicrm/sites/all/modules/civicrm/packages/DB/common.php(1903): PEAR->raiseError(NULL, -19, NULL, NULL, "SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...", "DB_Error", TRUE)
#6 /www/civicrm/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'civicrm_contact.contact_type' in 'field list'")
#7 /www/civicrm/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /www/civicrm/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#9 /www/civicrm/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#10 /www/civicrm/sites/all/modules/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#11 /www/civicrm/sites/all/modules/civicrm/CRM/Core/DAO.php(155): DB_DataObject->query("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#12 /www/civicrm/sites/all/modules/civicrm/CRM/Core/DAO.php(922): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...", TRUE)
#13 /www/civicrm/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(3985): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contac...")
#14 /www/civicrm/sites/all/modules/civicrm/CRM/Contact/Selector.php(505): CRM_Contact_BAO_Query->searchQuery(0, 50, Object(CRM_Utils_Sort), FALSE, FALSE)
#15 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php(402): CRM_Contact_Selector->getRows(4, 0, 50, Object(CRM_Utils_Sort), 1, NULL)
#16 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php(340): CRM_Core_Selector_Controller->getRows(Object(CRM_Contact_Selector_Controller))
#17 /www/civicrm/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(958): CRM_Core_Selector_Controller->run()
#18 /www/civicrm/sites/all/modules/civicrm/CRM/Contact/Form/Search/Basic.php(233): CRM_Contact_Form_Search->postProcess()
#19 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Form.php(246): CRM_Contact_Form_Search_Basic->postProcess()
#20 /www/civicrm/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Refresh.php(75): CRM_Core_Form->mainProcess()
#21 /www/civicrm/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Refresh->perform(Object(CRM_Contact_Form_Search_Basic), "refresh")
#22 /www/civicrm/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Basic), "refresh")
#23 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("refresh")
#24 /www/civicrm/sites/all/modules/civicrm/CRM/Core/Invoke.php(212): CRM_Core_Controller->run((Array:3), (Array:0))
#25 /www/civicrm/sites/all/modules/civicrm/drupal/civicrm.module(500): CRM_Core_Invoke::invoke((Array:3))
#26 [internal function](): civicrm_invoke("contact", "search")
#27 /www/civicrm/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
#28 /www/civicrm/index.php(21): menu_execute_active_handler()
#29 {main}

I have also attached a screenshot from phpMyAdmin showing that the tables exist.

kreynen

  • I post occasionally
  • **
  • Posts: 105
  • Karma: 8
Re: contact_type Error in log file after installing
November 15, 2012, 10:51:09 am
You seem to know your way around CiviCRM and MySQL, so I don't want to insult you... but did you empty the cache?  I don't know why you'd need to do this on a new install, but this is often the fix when CiviCRM says a column doesn't exist when it clearly does.

http://forum.civicrm.org/index.php?topic=23105.0 

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 15, 2012, 10:55:05 am
No worries, you will not insult me because I miss stuff all the time! I did clear the cache in Civi but to no avail.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: contact_type Error in log file after installing
November 18, 2012, 11:13:07 am
I'm not certain why you are getting this error. My first guess would be that you are looking at the wrong DB in phpMyAdmin.

If not, can you run this query in phpMyAdmin and see if it errs? If so, then try to remove some other fields and make the query as small as possible, but so that it still has the error. Then we can see better.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 19, 2012, 12:21:35 pm
I am looking at the right DB, I have it selected in phpMyAdmin, I wish it were that. I know enough to do the troubleshooting that I have done, but I don't know what query to run in phpMyAdmin to check it.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: contact_type Error in log file after installing
November 19, 2012, 12:33:17 pm
This is the query:

Code: [Select]
    SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contact_type`, civicrm_contact.contact_sub_type as `contact_sub_type`, civicrm_contact.sort_name as `sort_name`, civicrm_contact.display_name as `display_name`, civicrm_contact.id as us_contact_id, civicrm_contact.do_not_email as `do_not_email`, civicrm_contact.do_not_phone as `do_not_phone`, civicrm_contact.do_not_mail as `do_not_mail`, civicrm_contact.do_not_sms as `do_not_sms`, civicrm_contact.do_not_trade as `do_not_trade`, civicrm_contact.is_opt_out as `is_opt_out`, civicrm_contact.legal_identifier as `legal_identifier`, civicrm_contact.external_identifier as `external_identifier`, civicrm_contact.nick_name as `nick_name`, civicrm_contact.legal_name as `legal_name`, civicrm_contact.image_URL as `image_URL`, civicrm_contact.preferred_mail_format as `preferred_mail_format`, civicrm_contact.first_name as `first_name`, civicrm_contact.middle_name as `middle_name`, civicrm_contact.last_name as `last_name`, civicrm_contact.job_title as `job_title`, civicrm_contact.birth_date as `birth_date`, civicrm_contact.is_deceased as `is_deceased`, civicrm_contact.deceased_date as `deceased_date`, civicrm_contact.household_name as `household_name`, civicrm_contact.organization_name as `organization_name`, civicrm_contact.sic_code as `sic_code`, civicrm_contact.is_deleted as `contact_is_deleted`, gender.value as gender_id, gender.label as gender, individual_prefix.value as individual_prefix_id, individual_prefix.label as individual_prefix, individual_suffix.value as individual_suffix_id, individual_suffix.label as individual_suffix, IF ( contact_a.contact_type = 'Individual', contact_a.organization_name, NULL ) as current_employer, civicrm_address.id as address_id, civicrm_address.id as us_address_id, civicrm_address.street_address as `street_address`, civicrm_address.supplemental_address_1 as `supplemental_address_1`, civicrm_address.supplemental_address_2 as `supplemental_address_2`, civicrm_address.city as `city`, civicrm_address.postal_code_suffix as `postal_code_suffix`, civicrm_address.postal_code as `postal_code`, civicrm_address.geo_code_1 as `geo_code_1`, civicrm_address.geo_code_2 as `geo_code_2`, civicrm_state_province.id as us_state_province_id, civicrm_state_province.abbreviation as `state_province`, civicrm_state_province.name as state_province_name, civicrm_country.id as us_country_id, civicrm_country.name as `country`, civicrm_phone.id as us_phone_id, civicrm_phone.phone_type_id as phone_type_id, civicrm_phone.phone as `phone`, civicrm_email.id as us_email_id, civicrm_email.email as `email`, civicrm_email.on_hold as `on_hold`, civicrm_im.id as us_im_id, civicrm_im.provider_id as provider_id, civicrm_im.name as `im`, civicrm_worldregion.id as us_worldregion_id, civicrm_worldregion.name as `world_region`  FROM civicrm_contact contact_a LEFT JOIN civicrm_address ON ( contact_a.id = civicrm_address.contact_id AND civicrm_address.is_primary = 1 ) LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id  LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id  LEFT JOIN civicrm_email ON (contact_a.id = civicrm_email.contact_id AND civicrm_email.is_primary = 1)  LEFT JOIN civicrm_phone ON (contact_a.id = civicrm_phone.contact_id AND civicrm_phone.is_primary = 1)  LEFT JOIN civicrm_im ON (contact_a.id = civicrm_im.contact_id AND civicrm_im.is_primary = 1)  LEFT JOIN civicrm_worldregion ON civicrm_country.region_id = civicrm_worldregion.id  LEFT JOIN civicrm_option_group option_group_gender ON (option_group_gender.name = 'gender') LEFT JOIN civicrm_option_value gender ON (contact_a.gender_id = gender.value AND option_group_gender.id = gender.option_group_id)  LEFT JOIN civicrm_option_group option_group_prefix ON (option_group_prefix.name = 'individual_prefix') LEFT JOIN civicrm_option_value individual_prefix ON (contact_a.prefix_id = individual_prefix.value AND option_group_prefix.id = individual_prefix.option_group_id )  LEFT JOIN civicrm_option_group option_group_suffix ON (option_group_suffix.name = 'individual_suffix') LEFT JOIN civicrm_option_value individual_suffix ON (contact_a.suffix_id = individual_suffix.value AND option_group_suffix.id = individual_suffix.option_group_id )  WHERE (contact_a.is_deleted = 0) AND contact_a.id IN ( 53,43,20,39,33,94,99,95,82,31,21,71,49,29,14,66,88,51,64,6,54,92,1,12,90,91,81,86,85,69,9,59,26,97,101,55,30,89,37,2,50,45,98,62,23,74,83,76,15,11 )    GROUP BY contact_a.id  ORDER BY contact_a.sort_name asc, contact_a.id   
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 20, 2012, 05:39:46 am
Thanks for the query, the strange thing is that it does not work on a site where the database is working perfectly fine, nor does it work on a non-working database.

#1054 - Unknown column 'civicrm_contact.contact_type' in 'field list'

Additionally, I ran the query on a different working website on a different server and it did not work there either.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: contact_type Error in log file after installing
November 20, 2012, 05:58:51 am
After analyzing the query, I see the problem--the query is indeed faulted. The issue is:

Code: [Select]
SELECT contact_a.id as contact_id, civicrm_contact.contact_type as `contact_type`, ...
FROM civicrm_contact contact_a  ...

The phrase civicrm_contact.contact_type needs to be civicrm_a.contact_type although the truth is that with that fix, it still fails. :(

This is odd--looks like it may be a bug but I don't know. What is your CiviCRM version and what have you done aside from installing it?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 20, 2012, 06:04:01 am
4.2.6

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: contact_type Error in log file after installing
November 20, 2012, 06:05:06 am
and what have you done aside from installing it?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 20, 2012, 06:07:25 am
Sorry, forgot to answer that, nothing besides use the demo data. That is all.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: contact_type Error in log file after installing
November 20, 2012, 06:09:11 am
I would suggest you wait a few hours and see if a team member responds, and if not, then use the Issue Tracker link at the top of this page and file an issue and refer to this thread.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

stov

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.2.x
  • CMS version: Drupal 7.17
  • MySQL version: 5.1.63-CLI
  • PHP version: 5.3.8 CLI
Re: contact_type Error in log file after installing
November 20, 2012, 01:23:57 pm
I have been messing with this some more and finding some odd things. If I add a new individual, they show up, their contact type shows in the database as well, but when looking at their user info in Civi you can not tell who they are, only their address. If I click on 'Edit' everything is still there. Also, a new Organization works just fine.

I can also do a search using the AJAX search box in the upper left hand corner without a problem as well. Basically, any form that utilizes the AJAX fields works just fine, only those that require a call to the php code will error out with the above error.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • contact_type Error in log file after installing

This forum was archived on 2017-11-26.