Answers.Body: <p>Yes Agreed. This is a bug in CiviCRM Entity module as it is trying to fetch contribution pages even though the component is not enabled and also a core bug as account relationship option group is tied with CiviContribute Module and therefore it leads to DB:Syntax error. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-30T08:05:19.313Z
Answers.Text: Hello Pradeep, have you reported this bug ?
Answers.UserDisplayName: Ichi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-30T13:12:56.097Z
Answers.LastActivityDate: 2017-12-30T13:12:56.097Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>On CiviCRM 4.7.29 and earlier versions, there is an Drupal issue when CiviContribute component is desactivated. This probably occurs only if the components had been activated once. But it is too late to test this.
  The issue dissapear when the CiviContribute component is reactivated.
  So in my case I can live w/ that, but it might be concerning an issue w/ the component.
  I don't know how to report that.
  My PHP is 5.6.30-0+deb8u1.</p>
  
  <p>Here's the backTrace that shows when creating a new page in Drupal.</p>
  
  <pre><code>$backTrace = #0 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(945): CRM_Core_Error::backtrace("backTrace", TRUE) #1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error)) #2 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error)) #3 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error-&gt;__construct("DB Error: syntax error", -2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #4 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error-&gt;__construct(-2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #5 [internal function](): PEAR-&gt;_raiseError(Object(DB_mysqli), NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #6 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8)) #7 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR-&gt;__call("raiseError", (Array:7)) #8 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR-&gt;raiseError(NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #9 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common-&gt;raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...") #10 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli-&gt;mysqliRaiseError() #11 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;simpleQuery("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #12 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common-&gt;query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #13 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(441): DB_DataObject-&gt;_query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #14 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php(575): DB_DataObject-&gt;find() #15 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/FinancialType.php(196): CRM_Core_PseudoConstant::populate(NULL, "CRM_Financial_DAO_EntityFinancialAccount", TRUE, "entity_id", NULL, "account_relationship = AND entity_table = 'civicrm_financial_type' ") #16 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/ContributionPage.php(843): CRM_Financial_BAO_FinancialType::getIncomeFinancialType() #17 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/v3/Generic.php(437): CRM_Contribute_BAO_ContributionPage::buildOptions("financial_type_id", NULL, (Array:2)) #18 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(86): civicrm_api3_generic_getoptions((Array:9)) #19 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider-&gt;invoke((Array:9)) #20 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel-&gt;runRequest((Array:7)) #21 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel-&gt;runSafe("contribution_page", "getoptions", (Array:3), NULL) #22 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2667): civicrm_api("contribution_page", "getoptions", (Array:3)) #23 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2463): civicrm_entity_get_field_options("financial_type_id", "contribution_page") #24 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2341): civicrm_entity_get_field_widget((Array:14), "contribution_page") #25 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2191): _civicrm_entity_getproperties("contribution_page", "property_info") #26 /var/data/sites/photo/public_html/includes/module.inc(1163): civicrm_entity_field_extra_fields_alter((Array:61), NULL, NULL, NULL) #27 /var/data/sites/photo/public_html/modules/field/field.info.class.inc(468): drupal_alter("field_extra_fields", (Array:61)) #28 /var/data/sites/photo/public_html/modules/field/field.info.inc(690): FieldInfo-&gt;getBundleExtraFields("wysiwyg_profile", "wysiwyg_profile") #29 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/plugins/content_types/entity_context/entity_field_extra.inc(39): field_info_extra_fields("wysiwyg_profile", "wysiwyg_profile", "display") #30 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(151): ctools_entity_field_extra_content_type_content_types((Array:16)) #31 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(701): ctools_content_get_subtypes((Array:16)) #32 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/includes/common.inc(391): ctools_content_get_available_types((Array:0), FALSE, (Array:306), (Array:11)) #33 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1838): panels_common_get_allowed_types("panels_page", (Array:0)) #34 [internal function](): panel_context_panels_cache_get("page-test_bt::page_test_bt__panel::::") #35 /var/data/sites/photo/public_html/includes/module.inc(926): call_user_func_array("panel_context_panels_cache_get", (Array:1)) #36 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1706): module_invoke("panel_context", "panels_cache_get", "page-test_bt::page_test_bt__panel::::") #37 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/plugins/task_handlers/panel_context.inc(712): panels_edit_cache_get("panel_context:page-test_bt::page_test_bt__panel::::") #38 [internal function](): panels_panel_context_edit_content((Array:4), (Array:29)) #39 /var/data/sites/photo/public_html/includes/form.inc(842): call_user_func_array("panels_panel_context_edit_content", (Array:2)) #40 /var/data/sites/photo/public_html/includes/form.inc(351): drupal_retrieve_form("panels_panel_context_edit_content", (Array:29)) #41 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/wizard.inc(125): drupal_build_form("panels_panel_context_edit_content", (Array:29)) #42 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc(321): ctools_wizard_multistep_form((Array:12), "content", (Array:29)) #43 [internal function](): page_manager_page_add_subtask("page-test_bt", "content") #44 /var/data/sites/photo/public_html/includes/menu.inc(527): call_user_func_array("page_manager_page_add_subtask", (Array:2)) #45 /var/data/sites/photo/public_html/index.php(21): menu_execute_active_handler() #46 {main} 
  </code></pre>
  
Tags: <civicontribute>
Title: Drupal issue if CiviContribute component is desactivated
ThreadText: # Drupal issue if CiviContribute component is desactivated
  
  (Asked by: username_0 on 2017-12-30)
  
  On CiviCRM 4.7.29 and earlier versions, there is an Drupal issue when CiviContribute component is desactivated. This probably occurs only if the components had been activated once. But it is too late to test this.
  The issue dissapear when the CiviContribute component is reactivated.
  So in my case I can live w/ that, but it might be concerning an issue w/ the component.
  I don't know how to report that.
  My PHP is 5.6.30-0+deb8u1.
  
  Here's the backTrace that shows when creating a new page in Drupal.
  
  ```
  $backTrace = #0 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(945): CRM_Core_Error::backtrace("backTrace", TRUE) #1 [internal function](): CRM_Core_Error::exceptionHandler(Object(DB_Error)) #2 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error)) #3 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: syntax error", -2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #4 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-2, 16, (Array:2), "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #6 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8)) #7 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7)) #8 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...", "DB_Error", TRUE) #9 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...") #10 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError() #11 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #12 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common->query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #13 /var/data/sites/photo/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(441): DB_DataObject->_query("SELECT id, entity_id \n FROM civicrm_entity_financial_account \n \n WHERE (...") #14 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Core/PseudoConstant.php(575): DB_DataObject->find() #15 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/FinancialType.php(196): CRM_Core_PseudoConstant::populate(NULL, "CRM_Financial_DAO_EntityFinancialAccount", TRUE, "entity_id", NULL, "account_relationship = AND entity_table = 'civicrm_financial_type' ") #16 /var/data/sites/photo/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/ContributionPage.php(843): CRM_Financial_BAO_FinancialType::getIncomeFinancialType() #17 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/v3/Generic.php(437): CRM_Contribute_BAO_ContributionPage::buildOptions("financial_type_id", NULL, (Array:2)) #18 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(86): civicrm_api3_generic_getoptions((Array:9)) #19 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9)) #20 /var/data/sites/photo/public_html/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:7)) #21 /var/data/sites/photo/public_html/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("contribution_page", "getoptions", (Array:3), NULL) #22 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2667): civicrm_api("contribution_page", "getoptions", (Array:3)) #23 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2463): civicrm_entity_get_field_options("financial_type_id", "contribution_page") #24 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2341): civicrm_entity_get_field_widget((Array:14), "contribution_page") #25 /var/data/sites/photo/public_html/sites/all/modules/contrib/civicrm_entity/civicrm_entity.module(2191): _civicrm_entity_getproperties("contribution_page", "property_info") #26 /var/data/sites/photo/public_html/includes/module.inc(1163): civicrm_entity_field_extra_fields_alter((Array:61), NULL, NULL, NULL) #27 /var/data/sites/photo/public_html/modules/field/field.info.class.inc(468): drupal_alter("field_extra_fields", (Array:61)) #28 /var/data/sites/photo/public_html/modules/field/field.info.inc(690): FieldInfo->getBundleExtraFields("wysiwyg_profile", "wysiwyg_profile") #29 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/plugins/content_types/entity_context/entity_field_extra.inc(39): field_info_extra_fields("wysiwyg_profile", "wysiwyg_profile", "display") #30 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(151): ctools_entity_field_extra_content_type_content_types((Array:16)) #31 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/content.inc(701): ctools_content_get_subtypes((Array:16)) #32 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/includes/common.inc(391): ctools_content_get_available_types((Array:0), FALSE, (Array:306), (Array:11)) #33 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1838): panels_common_get_allowed_types("panels_page", (Array:0)) #34 [internal function](): panel_context_panels_cache_get("page-test_bt::page_test_bt__panel::::") #35 /var/data/sites/photo/public_html/includes/module.inc(926): call_user_func_array("panel_context_panels_cache_get", (Array:1)) #36 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/panels.module(1706): module_invoke("panel_context", "panels_cache_get", "page-test_bt::page_test_bt__panel::::") #37 /var/data/sites/photo/public_html/sites/all/modules/contrib/panels/plugins/task_handlers/panel_context.inc(712): panels_edit_cache_get("panel_context:page-test_bt::page_test_bt__panel::::") #38 [internal function](): panels_panel_context_edit_content((Array:4), (Array:29)) #39 /var/data/sites/photo/public_html/includes/form.inc(842): call_user_func_array("panels_panel_context_edit_content", (Array:2)) #40 /var/data/sites/photo/public_html/includes/form.inc(351): drupal_retrieve_form("panels_panel_context_edit_content", (Array:29)) #41 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/includes/wizard.inc(125): drupal_build_form("panels_panel_context_edit_content", (Array:29)) #42 /var/data/sites/photo/public_html/sites/all/modules/contrib/ctools/page_manager/plugins/tasks/page.admin.inc(321): ctools_wizard_multistep_form((Array:12), "content", (Array:29)) #43 [internal function](): page_manager_page_add_subtask("page-test_bt", "content") #44 /var/data/sites/photo/public_html/includes/menu.inc(527): call_user_func_array("page_manager_page_add_subtask", (Array:2)) #45 /var/data/sites/photo/public_html/index.php(21): menu_execute_active_handler() #46 {main} 
  
  ```
  
  **Tags:** civicontribute
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-30. Score: 0
  
  Yes Agreed. This is a bug in CiviCRM Entity module as it is trying to fetch contribution pages even though the component is not enabled and also a core bug as account relationship option group is tied with CiviContribute Module and therefore it leads to DB:Syntax error.
  
  > **Comments:**
  > **username_0**: Hello username_1, have you reported this bug ?  
  
  ---
  
  