Body: <p>After upgrading CiviCRM from v4.7.14 to 5.1 (or v4.7.31) which went seemingly well, CiviCRM encounters the following problem. <strong>UPDATE:</strong> Issue does not appear until 4.7.29 (including), and comes up only with the update to <strong>v4.7.30</strong> (Drupal).</p>
  
  <p>When I click on links in reports, <strong>they produce DB Error: no such field, e.g.</strong></p>
  
  <ul>
  <li>when clicking on a particular month in Contribution Summary report </li>
  <li>trying to open Contribution Details report </li>
  <li>clicking on contact link in Top Donors report</li>
  </ul>
  
  <p>and more.</p>
  
  <p>The DB errors seem to be produced by <strong>contact.birth_date</strong> field which used to cause no trouble.<br>
  I am not sure how to catch the situation when links just do not work.</p>
  
  <pre><code>Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  DB Error: no such field
  Error Details
  Database Error Code: Unknown column 'contact.birth_date' in 'field list', 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; CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']
      [type] =&gt; DB_Error
      [user_info] =&gt; CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']
      [to_string] =&gt; [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']"]
  )
  Return to home page.
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-02T14:39:42.840Z
Comments.Text: @JaapJansma-CiviCooP I am not sure if "Summary Fields" has anything to do with birth date fields. At least in its settings there is not a slightiest clue that it uses birthdate for anything.
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-02T22:43:59.147Z
Comments.Text: Ok. Then you have to look in a different direction. what I am trying to help you with is deducting what causes the problem. We can the assume it is not in an extension. What we have to figure out where this query is generated and executed. And I have to say I have not a clue where to look next.
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-26T16:47:10.237Z
Comments.Text: The issue begins with an update to v4.7.30 (i.e., update from 4.7.14. to 4.7.29. or anything before works fine, but anything beyond 4.7.29. introduces this error).
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-30T17:49:22.003Z
Comments.Text: After further research it came out that these errors occur if the **AGE** column is enabled in these reports, e.g.
  INSTANCE 8: Contribution details
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-25T07:49:53.323Z
Comments.Text: Looks like something is wrong with the query and probably with the specific report. The column `contact.birth_date` shoudl be called `contact_report.birth_date`. Which report exactly is failing? And ant change the report is in an extension?
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-25T08:34:59.493Z
Comments.Text: Do you get the same errors on http://dmaster.demo.civicrm.org/ ?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-25T14:30:36.067Z
Comments.Text: Aidan No, the error is not present on sandbox. It just appeared after my upgrade.
  ---
  @JaapJansma-CiviCooP Multiple reports are failing - Contribution Details, Top Donors, Attendee list and more. 
  ---
  What do you mean by "And ant change the report is in an extension?"
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-28T07:21:58.003Z
Comments.Text: I mean by "And ant change the report is in an extension" the question whether you have an extension which overrides those reports and which contains the bug.
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-29T11:21:51.850Z
Comments.Text: @JaapJansma-CiviCooP I don't think so. How can I find out?
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T07:40:27.610Z
Comments.Text: Which extensions do you have installed? You can see them in the extension directory. Did you install the civicrm installation yourself? If so you probably know what extensions you did install (or if you dont know, the answer is none).
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T08:46:18.023Z
Comments.Text: There is some error referencing the `birth_date` field. Try deselecting this field in the `Columns` tab and refresh the report.
Comments.UserDisplayName: jitendra - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T09:02:33.740Z
Comments.Text: @jitendra-fuzion Birth Date column is not selected.
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T09:08:08.067Z
Comments.Text: @JaapJansma-CiviCooP I have a few, such as CiviRules, Summary Fields, TinyMCE, CiviVolunteer, Angular Profiles.
Comments.UserDisplayName: Aivars
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T21:31:19.177Z
Comments.Text: I dont think none of these extension have such a report. It could be that it is caused by summary fields extension
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Tags: <upgrade><database><issues>
Title: DB Error after upgrading 4.7.x to 5.1 (Drupal)
ThreadText: # DB Error after upgrading 4.7.x to 5.1 (Drupal)
  
  (Asked by: username_0 on 2018-05-24)
  
  After upgrading CiviCRM from v4.7.14 to 5.1 (or v4.7.31) which went seemingly well, CiviCRM encounters the following problem. UPDATE: Issue does not appear until 4.7.29 (including), and comes up only with the update to v4.7.30 (Drupal).
  When I click on links in reports, they produce DB Error: no such field, e.g.
  
  when clicking on a particular month in Contribution Summary report 
  trying to open Contribution Details report 
  clicking on contact link in Top Donors report
  
  and more.
  The DB errors seem to be produced by contact.birth_date field which used to cause no trouble.
  I am not sure how to catch the situation when links just do not work.
  Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
  DB Error: no such field
  Error Details
  Database Error Code: Unknown column 'contact.birth_date' in 'field list', 1054
  Additional Details:
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -19
      [message] => DB Error: no such field
      [mode] => 16
      [debug_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']
      [type] => DB_Error
      [user_info] => CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']
      [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TEMPORARY TABLE civireport_contribution_detail_temp1  DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci AS SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_id, TIMESTAMPDIFF(YEAR, contact.birth_date, CURDATE()) as civicrm_contact_age, email_civireport.email as civicrm_email_email, phone_civireport.phone as civicrm_phone_phone, contribution_civireport.id as civicrm_contribution_contribution_id, contribution_civireport.financial_type_id as civicrm_contribution_financial_type_id, contribution_civireport.payment_instrument_id as civicrm_contribution_payment_instrument_id, contribution_civireport.currency as civicrm_contribution_currency, contribution_civireport.receive_date as civicrm_contribution_receive_date, contribution_civireport.total_amount as civicrm_contribution_total_amount, 'Contribution' as civicrm_contribution_contribution_or_soft, note_civireport.note as civicrm_note_contribution_note, value_member_since_1_civireport.membership_type_11 as civicrm_value_member_since_1_custom_11   FROM civicrm_contact contact_civireport   
        INNER JOIN civicrm_contribution contribution_civireport
          ON contact_civireport.id = contribution_civireport.contact_id
          AND contribution_civireport.is_test = 0
   LEFT JOIN civicrm_contribution_soft contribution_soft_civireport
                           ON contribution_soft_civireport.contribution_id = contribution_civireport.id
        LEFT JOIN civicrm_phone phone_civireport
               ON contact_civireport.id = phone_civireport.contact_id AND
                  phone_civireport.is_primary = 1
  
                   LEFT JOIN civicrm_address address_civireport
                             ON (contact_civireport.id =
                                 address_civireport.contact_id) AND
                                 address_civireport.is_primary = 1
  
              LEFT JOIN  civicrm_email email_civireport
                     ON (contact_civireport.id = email_civireport.contact_id AND
                         email_civireport.is_primary = 1) 
              LEFT JOIN civicrm_note note_civireport
                        ON ( note_civireport.entity_table = 'civicrm_contribution' AND
                             contribution_civireport.id = note_civireport.entity_id )
  LEFT JOIN civicrm_value_member_since_1 value_member_since_1_civireport ON value_member_since_1_civireport.entity_id = contact_civireport.id WHERE (1) AND ( contribution_civireport.contribution_status_id IN (1) ) AND (`note_civireport`.`id` IS NULL OR (`note_civireport`.`id` IN (SELECT id FROM `civicrm_note` WHERE ((entity_table = 'civicrm_relationship')) OR ((entity_table = 'civicrm_contact')) OR ((entity_table = 'civicrm_participant')) OR ((entity_table = 'civicrm_contribution')))))   GROUP BY contact_civireport.id, contribution_civireport.id  ORDER BY contribution_civireport.receive_date DESC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact.birth_date' in 'field list']"]
  )
  Return to home page.
  
  **Tags:** upgrade, database, issues
  
  > **Comments:**
  > **username_1**: Looks like something is wrong with the query and probably with the specific report. The column `contact.birth_date` shoudl be called `contact_report.birth_date`. Which report exactly is failing? And ant change the report is in an extension?  
  > **username_2**: Do you get the same errors on http://dmaster.demo.civicrm.org/ ?  
  > **username_0**: username_2 No, the error is not present on sandbox. It just appeared after my upgrade. --- @JaapJansma-CiviCooP Multiple reports are failing - Contribution Details, Top Donors, Attendee list and more.  --- What do you mean by "And ant change the report is in an extension?"  
  > **username_1**: I mean by "And ant change the report is in an extension" the question whether you have an extension which overrides those reports and which contains the bug.  
  > **username_0**: @JaapJansma-CiviCooP I don't think so. How can I find out?  
  > **username_1**: Which extensions do you have installed? You can see them in the extension directory. Did you install the civicrm installation yourself? If so you probably know what extensions you did install (or if you dont know, the answer is none).  
  > **username_3**: There is some error referencing the `birth_date` field. Try deselecting this field in the `Columns` tab and refresh the report.  
  > **username_0**: @jitendra-fuzion Birth Date column is not selected.  
  > **username_0**: @JaapJansma-CiviCooP I have a few, such as CiviRules, Summary Fields, TinyMCE, CiviVolunteer, Angular Profiles.  
  > **username_1**: I dont think none of these extension have such a report. It could be that it is caused by summary fields extension  
  > **username_0**: @JaapJansma-CiviCooP I am not sure if "Summary Fields" has anything to do with birth date fields. At least in its settings there is not a slightiest clue that it uses birthdate for anything.  
  > **username_1**: Ok. Then you have to look in a different direction. what I am trying to help you with is deducting what causes the problem. We can the assume it is not in an extension. What we have to figure out where this query is generated and executed. And I have to say I have not a clue where to look next.  
  > **username_0**: The issue begins with an update to v4.7.30 (i.e., update from 4.7.14. to 4.7.29. or anything before works fine, but anything beyond 4.7.29. introduces this error).  
  > **username_0**: After further research it came out that these errors occur if the **AGE** column is enabled in these reports, e.g. INSTANCE 8: Contribution details  
  
  ---
  
  ## 0 answers
  
  