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) »
  • Smart Group + User Defined Custom Query = SQL Error (custom query not found)
Pages: [1]

Author Topic: Smart Group + User Defined Custom Query = SQL Error (custom query not found)  (Read 563 times)

SNtialMKB

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
    • SNtial Technologies
  • CiviCRM version: clients on 2.2.8 to 3.4.8
  • CMS version: Drupal 6
  • MySQL version: 5.x
  • PHP version: 5.x
Smart Group + User Defined Custom Query = SQL Error (custom query not found)
November 02, 2011, 11:59:11 am
I'm wondering if folks have experienced this situation before? We are getting a "Sorry. A non-recoverable error has occurred. Could not get details for custom search." when we try to manage a Smart Group and View Contacts in that group.

We have a smart group that consists of both individuals and organizations, donors, and new contacts in the database who have either made a contribution in the last 3 years or have been added to the civicrm database in the last 3 years.  Rather than rely on specific date ranges, the smart group relies on a user created custom query to choose donors & new contacts who've been added or donated from the current date minus 3 years.

This Smart Group was used for a couple postal mailings a few months ago, when the number of contacts returned was around 3000+.

Now this smart group should be returning approximately 4500+ contacts.  Instead, when you "Manage Contacts > Contacts" to view the list of contacts, we get (with backtrace turned on)

backTrace (specific path changed back to generic values for purpose of this message)

/var/www/members/sites/foobar.org/modules/civicrm/CRM/Core/Error.php, backtrace, 296 /var/www/foo/sites/foobar.org/modules/civicrm/CRM/Contact/Form/Search/Custom.php, fatal, 58

Sorry. A non-recoverable error has occurred.
Could not get details for custom search.


It appears the smart group SQL has lost the Id# of the user generated custom query.

Aren't smart groups supposed to be able to work with custom queries?

The UI doesn't provide any method to edit the query used to generate the group, which is disappointing.

Client is on Drupal 6.19, MySQL 5.1.51, PHP 5.2.14, CiviCRM 3.4.4

Thanks,
-MaryKay
« Last Edit: November 02, 2011, 12:00:59 pm by SNtialMKB »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Smart Group + User Defined Custom Query = SQL Error (custom query not found)
November 02, 2011, 02:49:54 pm

hey marykay:

can u get one of SNtial developers to debug:

CRM/Contact/BAO/SearchCustom.php, function details

that function is basically returning an error (which could be due to many factors) and hence u r getting the fatal

Should be fairly easy to figure out whats happening and why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Smart Group + User Defined Custom Query = SQL Error (custom query not found)

This forum was archived on 2017-11-26.