Answers.Body: <p>That column really really should exist. Do you have access to see the underlying database through phpmyadmin or similar? I would expect either you have logging turned on but there is a problem with the database table or you have an issue with your mysql server, possibly the disk is full, or some db admin has made an error and deleted the column</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-07T22:41:00.587Z
Answers.Text: The field is there in the database.  See phpmyadmin screenshot added to the question.  The MySQL database is allowed over a GB of storage and has used less than 16MB. Hmmm ...
Answers.UserDisplayName: user1147171
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-09T12:37:12.687Z
Answers.Text: [My question with almost the same title](https://civicrm.stackexchange.com/questions/18951/no-such-field-card-type-but-exists) got an answer that pointed me in the correct direction: the problem is probably not with the table but with the triggers, it is they that fail and generate the error message. Turns out that e.g. upgrading with logging turned on fails to activate triggers. The solution for me was to turn logging off and the error went away. Maybe this is similar?
Answers.UserDisplayName: thoni56
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-07T21:39:06.983Z
Answers.LastActivityDate: 2017-05-07T21:39:06.983Z
Answers.UserDisplayName: user4619
Body: <p>I have created an event registration form, using a profile with a custom field. When I click <code>Continue</code> after filling in the form, I see <code>Processing ...</code> and then I get the confirmation screen, which looks good. But when I hit <code>Continue</code> I get:</p>
  
  <pre><code>Sorry but we are not able to provide this at the moment. DB Error: no such field Return to home page. 
  </code></pre>
  
  <p>WordPress 4.7.4</p>
  
  <p>CiviCRM 4.7.17</p>
  
  <p>Full debug info is shown below.  I get that <code>civicrm_event.event_type_id</code> is the problem but I'm not sure what to do about it.</p>
  
  <p>I get the feeling this relates to the profile used with this event. In the profile, the event type is associated with the participant</p>
  
  <p><a href="https://i.sstatic.net/QNvbc.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QNvbc.png" alt="profile"></a></p>
  
  <p>I'm filling in the event_type field from a URL variable.  Not sure if that might be a problem.</p>
  
  <p>If you want to try:</p>
  
  <p><a href="https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&amp;eventtype=Introduction" rel="nofollow noreferrer">https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&amp;eventtype=Introduction</a></p>
  
  <p>My code for the URL variables</p>
  
  <pre><code>&lt;script&gt;
  (function($) {
    // all JS code here
  var l = document.location;
    var affiliatecode = l.search.match(/affiliatecode=([a-zA-Z0-9_]+)/)[1];
  var eventtype = l.search.match(/eventtype=([a-zA-Z0-9_]+)/)[1];
     $( "input#custom_3").val(affiliatecode);
     $( "input#event_type").val(eventtype);
  })(jQuery);
  &lt;/script&gt;
  </code></pre>
  
  <p>Debug info:</p>
  
  <pre><code>Database Error Code: Unknown column 'civicrm_event.event_type_id' in 'on clause', 1054
  Additional Details:
  Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -19
      [message] =&gt; DB Error: no such field
      [mode] =&gt; 16
      [debug_info] =&gt; SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
      [type] =&gt; DB_Error
      [user_info] =&gt; SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
      [to_string] =&gt; [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, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']"]
  )
  </code></pre>
  
  <p>phpmyadmin screenshot showing that the field is there:<a href="https://i.sstatic.net/3fD29.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3fD29.png" alt="enter image description here"></a></p>
  
  <p>Backtrace, in case that might be helpful (site specific info replaced by <code>mysite</code>)</p>
  
  <pre><code>#0 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
  #1 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
  #2 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR_Error-&gt;__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #3 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error-&gt;__construct(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #4 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "DB_Error", TRUE)
  #5 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR-&gt;__call("raiseError", (Array:7))
  #6 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;raiseError(-19, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause'")
  #7 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli-&gt;mysqliRaiseError()
  #8 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #9 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common-&gt;query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #10 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject-&gt;_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #11 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(354): DB_DataObject-&gt;query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #12 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1304): CRM_Core_DAO-&gt;query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", TRUE)
  #13 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(4372): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #14 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1639): CRM_Contact_BAO_Query::apiQuery((Array:1), (Array:11), (Array:0))
  #15 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1972): CRM_Contact_BAO_Contact::getHierContactDetails("2", (Array:8))
  #16 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1880): CRM_Contact_BAO_Contact::formatProfileContactParams((Array:24), (Array:8), "2", NULL, "Individual")
  #17 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(1171): CRM_Contact_BAO_Contact::createProfileContact((Array:24), (Array:8), "2", (Array:0), NULL, "Individual", TRUE)
  #18 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(510): CRM_Event_Form_Registration_Confirm::updateContactFields("2", (Array:24), (Array:8), Object(CRM_Event_Form_Registration_Confirm))
  #19 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(453): CRM_Event_Form_Registration_Confirm-&gt;postProcess()
  #20 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form-&gt;mainProcess()
  #21 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine-&gt;perform(Object(CRM_Event_Form_Registration_Confirm), "next", "Next")
  #22 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next-&gt;perform(Object(CRM_Event_Form_Registration_Confirm), "next")
  #23 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Event_Form_Registration_Confirm), "next")
  #24 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page-&gt;handle("next")
  #25 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(310): CRM_Core_Controller-&gt;run((Array:3), NULL)
  #26 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
  #27 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #28 /mysite/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:3))
  #29 /mysite/wp-content/plugins/civicrm/includes/civicrm.basepage.php(132): CiviCRM_For_WordPress-&gt;invoke()
  #30 /mysite/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress_Basepage-&gt;basepage_handler(Object(WP))
  #31 /mysite/wp-includes/class-wp-hook.php(323): WP_Hook-&gt;apply_filters("", (Array:1))
  #32 /mysite/wp-includes/plugin.php(515): WP_Hook-&gt;do_action((Array:1))
  #33 /mysite/wp-includes/class-wp.php(746): do_action_ref_array("wp", (Array:1))
  #34 /mysite/wp-includes/functions.php(955): WP-&gt;main("")
  #35 /mysite/wp-blog-header.php(16): wp()
  #36 /mysite/index.php(17): require("/mysite/wp-blog-header.php")
  #37 {main}
  </code></pre>
  
  <p>Note that the Event Type field is a standard choice for Participants. That is not a custom field that I added. Below is a screenshot from a brand new install of CiviCRM. Perhaps this option should not be there?</p>
  
  <p><a href="https://i.sstatic.net/lGJVk.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lGJVk.jpg" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-08T06:42:50.823Z
Comments.Text: i barely follow what is happening but Event Type is a field that belongs to the entity type Event, and you seem to be associating that with a Participant record. seems like a bad mix to me. on the other hand, i see you have 'event type' in your url, are you actually just trying to get that value and add it in to a custom field on participant?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-08T19:24:50.937Z
Comments.Text: Yes, I'm trying to add that value to a field on participant, but it's not a custom field. I picked it from existing fields. The only custom field is Affiliate Code.
Comments.UserDisplayName: user1147171
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-08T19:49:54.927Z
Comments.Text: That is what I don't understand then. If you are adding data to a Participant, how do you think you can include a field pertaining to the Event via a Profile?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-09T20:37:16.697Z
Comments.Text: Event Type (Participant)  is a standard option when creating a new field in a profile. (See the last screenshot in my question, just added.) Perhaps it shouldn't be?
Comments.UserDisplayName: user1147171
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-09T21:49:47.520Z
Comments.Text: so i see. and has been for a long time. not sure what to suggest
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-10T22:32:00.417Z
Comments.Text: I'm going to create a new profile without that field for now.
Comments.UserDisplayName: user1147171
Tags: <wordpress><database>
Title: DB Error: no such field
ThreadText: # DB Error: no such field
  
  (Asked by: username_0 on 2017-05-07)
  
  I have created an event registration form, using a profile with a custom field. When I click Continue after filling in the form, I see Processing ... and then I get the confirmation screen, which looks good. But when I hit Continue I get:
  Sorry but we are not able to provide this at the moment. DB Error: no such field Return to home page. 
  
  WordPress 4.7.4
  CiviCRM 4.7.17
  Full debug info is shown below.  I get that civicrm_event.event_type_id is the problem but I'm not sure what to do about it.
  I get the feeling this relates to the profile used with this event. In the profile, the event type is associated with the participant
  
  I'm filling in the event_type field from a URL variable.  Not sure if that might be a problem.
  If you want to try:
  https://connectionpractice.org/test-webinar-with-affiliate-code/?affiliatecode=irthlingz1&eventtype=Introduction
  My code for the URL variables
  
  
  Debug info:
  Database Error Code: Unknown column 'civicrm_event.event_type_id' in 'on clause', 1054
  Additional 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, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
      [type] => DB_Error
      [user_info] => SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']
      [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, contact_a.contact_type as `contact_type`, contact_a.contact_sub_type as `contact_sub_type`, contact_a.first_name as `first_name`, contact_a.middle_name as `middle_name`, contact_a.last_name as `last_name`, contact_a.household_name as `household_name`, IF ( contact_a.contact_type = 'Individual', NULL, contact_a.organization_name ) as organization_name, `1-location_type`.id as `1-location_type_id`, `1-location_type`.name as `1-location_type`, `1-email`.id as `1-email_id`, `1-email`.email as `1-email`, `Billing-location_type`.id as `Billing-location_type_id`, `Billing-location_type`.name as `Billing-location_type`, `Billing-email`.id as `Billing-email_id`, `Billing-email`.email as `Billing-email`, civicrm_participant.id as participant_id, event_type.label as event_type, civicrm_participant.role_id as participant_role, civicrm_value_webinar_registration_3.id as civicrm_value_webinar_registration_3_id, civicrm_value_webinar_registration_3.affiliate_code_3 as custom_3  FROM civicrm_contact contact_a 
  LEFT JOIN civicrm_email `1-email` ON contact_a.id = `1-email`.contact_id AND `1-email`.is_primary = 1  
  LEFT JOIN civicrm_email `Billing-email` ON contact_a.id = `Billing-email`.contact_id AND `Billing-email`.location_type_id = 5  
  LEFT JOIN civicrm_location_type `1-location_type` ON (  ( `1-email`.location_type_id = `1-location_type`.id ) )  
  LEFT JOIN civicrm_location_type `Billing-location_type` ON (  ( `Billing-email`.location_type_id = `Billing-location_type`.id ) )  LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id  
  LEFT JOIN civicrm_value_webinar_registration_3 ON civicrm_value_webinar_registration_3.entity_id = `civicrm_participant`.id  LEFT JOIN civicrm_option_group option_group_event_type ON (option_group_event_type.name = 'event_type') LEFT JOIN civicrm_option_value event_type ON (civicrm_event.event_type_id = event_type.value AND option_group_event_type.id = event_type.option_group_id )  LEFT JOIN civicrm_option_group option_group_participant_role ON (option_group_participant_role.name = 'participant_role') LEFT JOIN civicrm_option_value participant_role ON ((civicrm_participant.role_id = participant_role.value OR SUBSTRING_INDEX(role_id,'', 1) = participant_role.value)
                                 AND option_group_participant_role.id = participant_role.option_group_id )  WHERE  ( contact_a.id = '2' )   GROUP BY contact_a.id LIMIT 0, 25  [nativecode=1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause']"]
  )
  
  phpmyadmin screenshot showing that the field is there:
  Backtrace, in case that might be helpful (site specific info replaced by mysite)
  #0 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
  #1 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(921): CRM_Core_Error::handle(Object(DB_Error))
  #2 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB.php(984): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #3 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #4 /mysite/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "DB_Error", TRUE)
  #5 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
  #6 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", "1054 ** Unknown column 'civicrm_event.event_type_id' in 'on clause'")
  #7 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
  #8 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #9 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2438): DB_common->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #10 /mysite/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1627): DB_DataObject->_query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #11 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(354): DB_DataObject->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #12 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1304): CRM_Core_DAO->query("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...", TRUE)
  #13 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Query.php(4372): CRM_Core_DAO::executeQuery("SELECT contact_a.id as contact_id, contact_a.contact_type as `contact_type`, ...")
  #14 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1639): CRM_Contact_BAO_Query::apiQuery((Array:1), (Array:11), (Array:0))
  #15 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1972): CRM_Contact_BAO_Contact::getHierContactDetails("2", (Array:8))
  #16 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php(1880): CRM_Contact_BAO_Contact::formatProfileContactParams((Array:24), (Array:8), "2", NULL, "Individual")
  #17 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(1171): CRM_Contact_BAO_Contact::createProfileContact((Array:24), (Array:8), "2", (Array:0), NULL, "Individual", TRUE)
  #18 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php(510): CRM_Event_Form_Registration_Confirm::updateContactFields("2", (Array:24), (Array:8), Object(CRM_Event_Form_Registration_Confirm))
  #19 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(453): CRM_Event_Form_Registration_Confirm->postProcess()
  #20 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
  #21 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Event_Form_Registration_Confirm), "next", "Next")
  #22 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Event_Form_Registration_Confirm), "next")
  #23 /mysite/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_Confirm), "next")
  #24 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
  #25 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(310): CRM_Core_Controller->run((Array:3), NULL)
  #26 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:15))
  #27 /mysite/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #28 /mysite/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:3))
  #29 /mysite/wp-content/plugins/civicrm/includes/civicrm.basepage.php(132): CiviCRM_For_WordPress->invoke()
  #30 /mysite/wp-includes/class-wp-hook.php(298): CiviCRM_For_WordPress_Basepage->basepage_handler(Object(WP))
  #31 /mysite/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters("", (Array:1))
  #32 /mysite/wp-includes/plugin.php(515): WP_Hook->do_action((Array:1))
  #33 /mysite/wp-includes/class-wp.php(746): do_action_ref_array("wp", (Array:1))
  #34 /mysite/wp-includes/functions.php(955): WP->main("")
  #35 /mysite/wp-blog-header.php(16): wp()
  #36 /mysite/index.php(17): require("/mysite/wp-blog-header.php")
  #37 {main}
  
  Note that the Event Type field is a standard choice for Participants. That is not a custom field that I added. Below is a screenshot from a brand new install of CiviCRM. Perhaps this option should not be there?
  
  **Tags:** wordpress, database
  
  > **Comments:**
  > **username_1**: i barely follow what is happening but Event Type is a field that belongs to the entity type Event, and you seem to be associating that with a Participant record. seems like a bad mix to me. on the other hand, i see you have 'event type' in your url, are you actually just trying to get that value and add it in to a custom field on participant?  
  > **username_0**: Yes, I'm trying to add that value to a field on participant, but it's not a custom field. I picked it from existing fields. The only custom field is Affiliate Code.  
  > **username_1**: That is what I don't understand then. If you are adding data to a Participant, how do you think you can include a field pertaining to the Event via a Profile?  
  > **username_0**: Event Type (Participant)  is a standard option when creating a new field in a profile. (See the last screenshot in my question, just added.) Perhaps it shouldn't be?  
  > **username_1**: so i see. and has been for a long time. not sure what to suggest  
  > **username_0**: I'm going to create a new profile without that field for now.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-05-07. Score: 1
  
  That column really really should exist. Do you have access to see the underlying database through phpmyadmin or similar? I would expect either you have logging turned on but there is a problem with the database table or you have an issue with your mysql server, possibly the disk is full, or some db admin has made an error and deleted the column
  
  > **Comments:**
  > **username_0**: The field is there in the database.  See phpmyadmin screenshot added to the question.  The MySQL database is allowed over a GB of storage and has used less than 16MB. Hmmm ...  
  > **username_3**: [My question with almost the same title](https://civicrm.stackexchange.com/questions/18951/no-such-field-card-type-but-exists) got an answer that pointed me in the correct direction: the problem is probably not with the table but with the triggers, it is they that fail and generate the error message. Turns out that e.g. upgrading with logging turned on fails to activate triggers. The solution for me was to turn logging off and the error went away. Maybe this is similar?  
  
  ---
  
  