Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13878

Unknown column 'civicrm_contribution.id' in 'on clause' when contribution note field included in profile

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.2
    • Fix Version/s: 4.5
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      duped in demo site at http://wordpress.demo.civicrm.org/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=4

      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.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`, `Home-location_type`.id as `Home-location_type_id`, `Home-location_type`.name as `Home-location_type`, `Home-address`.id as `Home-address_id`, `Home-address`.street_address as `Home-street_address`, `Home-address`.city as `Home-city`, `Home-address`.postal_code as `Home-postal_code`, `Home-address`.country_id as `Home-country_id`, `Home-address`.state_province_id as `Home-state_province_id`, `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_note.note as contribution_note FROM civicrm_contact contact_a
      LEFT JOIN civicrm_address `Home-address` ON (`Home-address`.contact_id = contact_a.id AND `Home-address`.location_type_id = 1)
      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_location_type `Home-location_type` ON ( ( `Home-address`.location_type_id = `Home-location_type`.id ) ) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contribution' AND
      civicrm_contribution.id = civicrm_note.entity_id ) WHERE ( contact_a.id = 164 ) GROUP BY contact_a.id LIMIT 0, 25 [nativecode=1054 ** Unknown column 'civicrm_contribution.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.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`, `Home-location_type`.id as `Home-location_type_id`, `Home-location_type`.name as `Home-location_type`, `Home-address`.id as `Home-address_id`, `Home-address`.street_address as `Home-street_address`, `Home-address`.city as `Home-city`, `Home-address`.postal_code as `Home-postal_code`, `Home-address`.country_id as `Home-country_id`, `Home-address`.state_province_id as `Home-state_province_id`, `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_note.note as contribution_note FROM civicrm_contact contact_a
      LEFT JOIN civicrm_address `Home-address` ON (`Home-address`.contact_id = contact_a.id AND `Home-address`.location_type_id = 1)
      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_location_type `Home-location_type` ON ( ( `Home-address`.location_type_id = `Home-location_type`.id ) ) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contribution' AND
      civicrm_contribution.id = civicrm_note.entity_id ) WHERE ( contact_a.id = 164 ) GROUP BY contact_a.id LIMIT 0, 25 [nativecode=1054 ** Unknown column 'civicrm_contribution.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.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`, `Home-location_type`.id as `Home-location_type_id`, `Home-location_type`.name as `Home-location_type`, `Home-address`.id as `Home-address_id`, `Home-address`.street_address as `Home-street_address`, `Home-address`.city as `Home-city`, `Home-address`.postal_code as `Home-postal_code`, `Home-address`.country_id as `Home-country_id`, `Home-address`.state_province_id as `Home-state_province_id`, `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_note.note as contribution_note FROM civicrm_contact contact_a
      LEFT JOIN civicrm_address `Home-address` ON (`Home-address`.contact_id = contact_a.id AND `Home-address`.location_type_id = 1)
      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_location_type `Home-location_type` ON ( ( `Home-address`.location_type_id = `Home-location_type`.id ) ) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contribution' AND
      civicrm_contribution.id = civicrm_note.entity_id ) WHERE ( contact_a.id = 164 ) GROUP BY contact_a.id LIMIT 0, 25 [nativecode=1054 ** Unknown column 'civicrm_contribution.id' in 'on clause']"]
      )

        Attachments

        1. CRM-13878.1.patch
          0.6 kB
          Joe Price
        2. CRM-13878.2.patch
          0.6 kB
          Joe Price
        3. CRM-13878.3.patch
          0.8 kB
          Joe Price

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              pricejn2 Joe Price
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: