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

Deactivating CiviContribute causes SQL error

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.31
    • Fix Version/s: None
    • Component/s: CiviContribute
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Needs Funding
    • Verified?:
      No
    • Overview:
      Hide
      The account_relationship is not available when the module is deactivated. Therefor, the SQL is not proper:

      WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type')
      Show
      The account_relationship is not available when the module is deactivated. Therefor, the SQL is not proper: WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type')

      Description

      When CiviContribute is deactivated, several actions (e.g. clearing the cache) cause an SQL error.

      $Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => exceptionHandler ) [code] => -2 [message] => DB Error: syntax error [mode] => 16 [debug_info] => SELECT id, entity_id FROM civicrm_entity_financial_account WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id' at line 4] [type] => DB_Error [user_info] => SELECT id, entity_id FROM civicrm_entity_financial_account WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id' at line 4] [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT id, entity_id FROM civicrm_entity_financial_account WHERE ( account_relationship = AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND entity_table = 'civicrm_financial_type' ) ORDER BY entity_id' at line 4]"] )

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              edvanleeuwen Ed van Leeuwen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: