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) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search and Sort giving error
Pages: [1]

Author Topic: Search and Sort giving error  (Read 461 times)

bstalcup

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 1
  • CiviCRM version: 4.7.3
  • CMS version: Joomla!
  • MySQL version: 5.5.36-cll-lve
  • PHP version: 5.3.29
Search and Sort giving error
June 20, 2014, 02:29:22 pm
Hello,

I'm currently encountering an issue when I do an advanced search and try to sort by one of the shown columns in the search results page.  I get a "DB Error: syntax error"  I'm not sure where the error is coming from, because I could do the correct functionality on a different site and on Civi's demo site

Code: [Select]
Jun 20 14:28:58  [info] $backTrace = #0 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php(197): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#4 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#5 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...", "DB_Error", TRUE)
#6 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#7 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#9 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#10 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#11 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(160): DB_DataObject->query("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#12 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/DAO.php(908): CRM_Core_DAO->query("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...", TRUE)
#13 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Selector.php(975): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_prevnext_cache ( entity_table, entity_id1, entity_id2, ca...")
#14 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Selector.php(935): CRM_Contact_Selector->rebuildPreNextCache(0, 500, Object(CRM_Utils_Sort), "civicrm search e5f1ada47770a6fda7b72bce69aa3007_865")
#15 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Selector.php(810): CRM_Contact_Selector->fillupPrevNextCache(Object(CRM_Utils_Sort), "civicrm search e5f1ada47770a6fda7b72bce69aa3007_865", 0, 500)
#16 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Selector.php(520): CRM_Contact_Selector->buildPrevNextCache(Object(CRM_Utils_Sort))
#17 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Selector/Controller.php(402): CRM_Contact_Selector->getRows(4, 0, 50, Object(CRM_Utils_Sort), 1, NULL)
#18 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Selector/Controller.php(340): CRM_Core_Selector_Controller->getRows(Object(CRM_Contact_Selector_Controller))
#19 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search.php(961): CRM_Core_Selector_Controller->run()
#20 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search/Builder.php(394): CRM_Contact_Form_Search->postProcess()
#21 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search.php(798): CRM_Contact_Form_Search_Builder->postProcess()
#22 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Contact/Form/Search/Builder.php(67): CRM_Contact_Form_Search->preProcess()
#23 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Form.php(351): CRM_Contact_Form_Search_Builder->preProcess()
#24 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(93): CRM_Core_Form->buildForm()
#25 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Search_Builder), "display")
#26 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Builder), "display")
#27 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Controller.php(339): HTML_QuickForm_Page->handle("display")
#28 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(323): CRM_Core_Controller->run((Array:4), (Array:0))
#29 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:13))
#30 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#31 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/admin.civicrm.php(116): CRM_Core_Invoke::invoke((Array:4))
#32 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/components/com_civicrm/admin.civicrm.php(40): civicrm_invoke()
#33 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/libraries/joomla/application/component/helper.php(380): require_once("/mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/compone...")
#34 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/libraries/joomla/application/component/helper.php(348): JComponentHelper::executeComponent("/mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/compone...")
#35 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/includes/application.php(153): JComponentHelper::renderComponent("com_civicrm")
#36 /mnt/data/vhosts/casite-549834.cloudaccess.net/httpdocs/administrator/index.php(46): JAdministrator->dispatch()
#37 {main}

I'm not sure where to begin debugging this error; it could come from a several number of places, but I'm hoping someone on this forum can point to where I might go about fixing this error, and if the source is found, I'd be happy to log it as an issue.

Thanks,
bstalcup

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Search and Sort giving error
July 21, 2014, 08:48:59 am
We are having the same issue. Interestingly enough, it is so far limited to only one group, and only one column. The same column works in other groups, and the other columns work in this particular group. I've found a few workarounds, but they create additional steps for staff to take. Were you able to resolve this issue?

bstalcup

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 1
  • CiviCRM version: 4.7.3
  • CMS version: Joomla!
  • MySQL version: 5.5.36-cll-lve
  • PHP version: 5.3.29
Re: Search and Sort giving error
July 21, 2014, 08:58:07 am
Interestingly enough, our problems went away when we upgraded to CiviCRM version 4.4.6.  Sorry if that's not much help; I hope you get it sorted out!

LMKWeb

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.2.6
  • CMS version: Joomla 2.5.8
Re: Search and Sort giving error
July 21, 2014, 09:03:10 am
That's actually good to know! We have not upgraded yet, still running 4.4.5. I didn't see this particular issue on the changelog, but that doesn't mean it wasn't related to something else that was fixed. Thanks!

bstalcup

  • I post occasionally
  • **
  • Posts: 47
  • Karma: 1
  • CiviCRM version: 4.7.3
  • CMS version: Joomla!
  • MySQL version: 5.5.36-cll-lve
  • PHP version: 5.3.29
Re: Search and Sort giving error
July 21, 2014, 09:06:11 am
Yep, in the same boat.  Looked to see if they solved the problem in the change log, and they didn't.  Tested it on our website again and it worked.... no complaints here!  ;D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Search and Sort giving error

This forum was archived on 2017-11-26.