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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database Error Code: Unknown column 'contribution.honor_contact_id'
Pages: [1]

Author Topic: Database Error Code: Unknown column 'contribution.honor_contact_id'  (Read 462 times)

stigmil

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.4.7
  • CMS version: 2.5.24
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Database Error Code: Unknown column 'contribution.honor_contact_id'
September 18, 2014, 11:00:52 am
Database error after upgrading Joomla Civi from 4.4.6 to 4.4.7. Upgrade all seemed to go fine.  But now the quicksearch box on the Civi Home Page doesn't return any search results.  When I use the search tab, it finds records as expected but when I click on a contact to see the detailed record I get this error:

Code: [Select]
Sorry but we are not able to provide this at the moment.
DB Error: no such field
Error Details
Database Error Code: Unknown column 'contribution.honor_contact_id' in 'where 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 count( x.id ) count FROM (
      SELECT contribution.id AS id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution INNER JOIN civicrm_contribution_soft softContribution
      ON ( contribution.id = softContribution.contribution_id )
      WHERE contribution.is_test = 0 AND softContribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.honor_contact_id = 49 ) x [nativecode=1054 ** Unknown column 'contribution.honor_contact_id' in 'where clause']
    [type] => DB_Error
    [user_info] => SELECT count( x.id ) count FROM (
      SELECT contribution.id AS id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution INNER JOIN civicrm_contribution_soft softContribution
      ON ( contribution.id = softContribution.contribution_id )
      WHERE contribution.is_test = 0 AND softContribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.honor_contact_id = 49 ) x [nativecode=1054 ** Unknown column 'contribution.honor_contact_id' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT count( x.id ) count FROM (
      SELECT contribution.id AS id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution INNER JOIN civicrm_contribution_soft softContribution
      ON ( contribution.id = softContribution.contribution_id )
      WHERE contribution.is_test = 0 AND softContribution.contact_id = 49  UNION
      SELECT contribution.id
      FROM civicrm_contribution contribution
      WHERE contribution.is_test = 0 AND contribution.honor_contact_id = 49 ) x [nativecode=1054 ** Unknown column 'contribution.honor_contact_id' in 'where clause']"]
)
Any ideas?

Pre-history: I had previously tried to upgrade from 4.4.6 to 4.5.0 but the upgrade failed so I restored the whole site (including database) from a backup made immediately before the failed upgrade.

redgar

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
    • NJ Libertarian Party
  • CiviCRM version: 4.5.0
  • CMS version: Joomla 2.5.27
Re: Database Error Code: Unknown column 'contribution.honor_contact_id'
September 18, 2014, 02:00:53 pm
I'm at 4.4.6 and my contribution table has an honor_contact_id column. My guess is that a previous upgrade went sour and your database didn't have that column added and it hasn't caused any troubles until now.

Here is what I have for that table at 4.4.6:

#NameTypeCollationAttributesNullDefaultExtra
1idint(10) UNSIGNEDNoNoneAUTO_INCREMENT
2contact_idint(10) UNSIGNEDNoNone
3financial_type_idint(10) UNSIGNEDYes NULL
4contribution_page_idint(10) UNSIGNEDYesNULL
5payment_instrument_idint(10) UNSIGNEDYesNULL
6receive_datedatetime YesNULL
7non_deductible_amountdecimal(20,2) Yes0.00
8total_amountdecimal(20,2) NoNone
9fee_amountdecimal(20,2) YesNULL
10net_amountdecimal(20,2) YesNULL
11trxn_idvarchar(255)latin1_swedish_ci YesNULL
12invoice_idvarchar(255)latin1_swedish_ci YesNULL
13currencyvarchar(3)utf8_unicode_ci YesNULL
14cancel_datedatetime YesNULL
15cancel_reasontextlatin1_swedish_ci YesNULL
16receipt_datedatetime YesNULL
17thankyou_datedatetime YesNULL
18sourcevarchar(255)latin1_swedish_ci YesNULL
19amount_leveltextlatin1_swedish_ci YesNULL
20contribution_recur_idint(10) UNSIGNEDYesNULL
21honor_contact_idint(10) UNSIGNEDYesNULL
22is_testtinyint(4) Yes0
23is_pay_latertinyint(4) Yes0
24contribution_status_idint(10) UNSIGNEDYes1
25honor_type_idint(10) UNSIGNEDYesNULL
26address_idint(10) UNSIGNEDYesNULL
27check_numbervarchar(255)latin1_swedish_ci YesNULL
28campaign_idint(10) UNSIGNEDYesNULL

stigmil

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.4.7
  • CMS version: 2.5.24
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: Database Error Code: Unknown column 'contribution.honor_contact_id'
September 18, 2014, 03:01:56 pm
Thanks - I've rolled back to 4.4.6 and my contribution table has the same structure as yours - including the 'honor_contact_id' column. So now I'm even more confused!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Database Error Code: Unknown column 'contribution.honor_contact_id'

This forum was archived on 2017-11-26.