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 update via phpmyadmin fail
Pages: [1]

Author Topic: Smart group update via phpmyadmin fail  (Read 845 times)

daybell

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Vermont Progressive Party
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.22
Smart group update via phpmyadmin fail
February 03, 2012, 10:54:37 am

I wanted to set up a smart group that would include contacts at a group of a couple hundred of specific addresses, and didn't want to have to enter all of the criteria using Search Builder.

I went in and set up the first few, and then using phpmyadmin, found the appropriate record in the  civicrm_saved_search table. I edited the where_clause there to include the full list of criteria.

When I search on that smart group through advanced search) the old smaller record set is return. When I go int to edit criteria via manage groups, it is still showing me the old search criteria with the serach builder profile. I have been back in to civicrm_saved_search table through phpmyadmin several times, and the new criteria are definitely saved.

I played around a bit with the smart group cache, and watching it in phpmyadmin I am confident that civicrm_group_contact_cache has been flushed, and then gets repopulated, but the old search criteria are still the ones being used.

Any idea why civiCRM would be ignoring my updated where_clause in civicrm_saved_search? Is there a second place where this criteria needs to be updated?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Smart group update via phpmyadmin fail
February 03, 2012, 11:00:25 am
Hi,

The smart group is a complex bit of code, bypassing and going directly in the db, you might have something incoherent.

Have you looked at civicrm_group for your smart search id? Seems some params are there

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

daybell

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Vermont Progressive Party
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.22
Re: Smart group update via phpmyadmin fail
February 03, 2012, 11:46:05 am
It wouldn't be the first time I was incoherent!

I checked in civicrm_group, and the where_clause (and select_tables and where_tables) refers to "civicrm_group_contact_cache_87".

civicrm_group_contact_cache was again blank, and after searching on that smart group, was again repopulated using the old criteria.

What I find most confusing is that the smart group is still recalling the initial criteria I set up, even though those no longer appear in civicrm_group. If I did get something wrong with the code, I would think I'd get an error, not a reversion to the old criteria which is no longer there.

Morgan

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 update via phpmyadmin fail
February 03, 2012, 12:11:18 pm

If i had to guess, once we started using the cache for smart groups, we no longer use the from/where/clauses in the table (in most cases)

its been on our list of things to clean up

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

daybell

  • I’m new here
  • *
  • Posts: 21
  • Karma: 0
    • Vermont Progressive Party
  • CiviCRM version: 4.1.5
  • CMS version: Drupal 6.26
  • MySQL version: 5.5.22
Re: Smart group update via phpmyadmin fail
February 03, 2012, 01:19:25 pm
Update:

I looked at the code I used in the where_clause in civicrm_saved_search, and found that there were a few spaces missing--I fixed those and re-replaced, with no luck. Not sure if that would matter.

I then edited the smart group criteria via manage groups, which again brought up the old criteria. I changed and saved that criteria, looking via phpmyadmin saw that the where_clause in civicrm_saved_search was replaced with the original but changed data, (not the longer criteria I forced in there).

Could that data in where_clause be in another table in civi as well?

Morgan

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Smart group update via phpmyadmin fail

This forum was archived on 2017-11-26.