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

Export of relation fields throws SQL error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.alpha
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When trying to export contacts after doing an advanced search, I get the following error message:

      Sorry. A non-recoverable error has occurred.
      DB Error: value count on row
      Error Details
      Database Error Code: Column count doesn't match value count at row 1, 1136
      Additional Details:
      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -22
      [message] => DB Error: value count on row
      [mode] => 16
      [debug_info] =>
      INSERT INTO civicrm_export_temp (id, first_name,last_name)
      VALUES (1,'','','')
      [nativecode=1136 ** Column count doesn't match value count at row 1]
      [type] => DB_Error
      [user_info] =>
      INSERT INTO civicrm_export_temp (id, first_name,last_name)
      VALUES (1,'','','')
      [nativecode=1136 ** Column count doesn't match value count at row 1]
      [to_string] => [db_error: message="DB Error: value count on row" code=-22 mode=callback callback=CRM_Core_Error::handle prefix="" info="
      INSERT INTO civicrm_export_temp (id, first_name,last_name)
      VALUES (1,'','','')
      [nativecode=1136 ** Column count doesn't match value count at row 1]"]
      )

      To reproduce this issue in the civicrm sandbox:

      • Click Search --> Advanced Search
      • Choose as the criteria: relationship is "Volunteer of"
      • In the list of batch actions, choose "Export Contacts"
      • Choose "Select fields for export" then click continue
      • In the list of fields to export, choose "first name" , "last name", "Volunteer for" ... "Extra Volunteer Relationship Info...Sample field 1 " ( This is a custom field)

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: