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) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Odd core function being called when exporting custom search
Pages: [1]

Author Topic: Odd core function being called when exporting custom search  (Read 890 times)

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Odd core function being called when exporting custom search
March 18, 2014, 06:21:52 am
I have a custom search that is working fine, except for the action "Export Contacts"      . The export contacts action is calling the core function alterQuery in "/CRM/Core/Component.php"       This function is attempting to add an invalid filter to the where clause.  Any ideas on how I can fix this?

The full stack trace is:
Code: [Select]
ublic_html/sites/all/modules/civicrm/CRM/Core/Error.php(308): CRM_Core_Error::backtrace()
#1 /home/test1/public_html/sites/all/modules/civicrm/CRM/Utils/Type.php(229): CRM_Core_Error::fatal(" is not of the type Integer")
#2 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(4755): CRM_Utils_Type::escape((Array:1), "Integer")
#3 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/Query.php(306): CRM_Contact_BAO_Query::buildClause("civicrm_contribution.financial_type_id", "=", (Array:1), "Integer")
#4 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contribute/BAO/Query.php(227): CRM_Contribute_BAO_Query::whereClauseSingle((Array:5), Object(CRM_Contact_BAO_Query))
#5 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Component.php(229): CRM_Contribute_BAO_Query::where(Object(CRM_Contact_BAO_Query))
#6 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(1619): CRM_Core_Component::alterQuery(Object(CRM_Contact_BAO_Query), "where")
#7 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(481): CRM_Contact_BAO_Query->whereClause()
#8 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php(442): CRM_Contact_BAO_Query->initialize()
#9 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/Selector.php(212): CRM_Contact_BAO_Query->__construct((Array:7), NULL, NULL, FALSE, FALSE, 1, FALSE, TRUE, FALSE, NULL, 1)
#10 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/Form/Search.php(763): CRM_Contact_Selector->__construct("CRM_Contact_Form_Search_Custom_TestEngagementSummary", (Array:18), (Array:7), NULL, 16384, FALSE, TRUE, "custom", (Array:11))
#11 /home/test1/public_html/sites/all/modules/civicrm/CRM/Contact/Form/Search/Custom.php(75): CRM_Contact_Form_Search->preProcess()
#12 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(336): CRM_Contact_Form_Search_Custom->preProcess()
#13 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/StateMachine.php(136): CRM_Core_Form->buildForm()
#14 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Search_Custom), "next", "Next")
#15 /home/test1/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Search_Custom), "next")
#16 /home/test1/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Custom), "next")
#17 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("next")
#18 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(292): CRM_Core_Controller->run((Array:4), (Array:0))
#19 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:12))
#20 /home/test1/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#21 /home/test1/public_html/sites/all/modules/civicrm/drupal/civicrm.module(354): CRM_Core_Invoke::invoke((Array:4))
#22 [internal function](): civicrm_invoke("contact", "search", "custom")
#23 /home/test1/public_html/includes/menu.inc(348): call_user_func_array("civicrm_invoke", (Array:3))
#24 /home/test1/public_html/index.php(18): menu_execute_active_handler()
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

SarahG (FountainTribe)

  • Ask me questions
  • ****
  • Posts: 782
  • Karma: 29
  • CiviCRM version: 4.4.7
  • CMS version: Drupal 6, Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Odd core function being called when exporting custom search
March 18, 2014, 06:56:27 am
I think I found the issue:  I had named one of my custom search filters "financial_type".   If I change the name to "aaa_financial_type" (or anything else) then the export starts working.

Is there a list of what filter names custom searches should avoid using?   
Did I help you? Please donate to the Civi-Make-It-Happen campaign  CiviCRM for mobile devices! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Odd core function being called when exporting custom search

This forum was archived on 2017-11-26.