Answers.Body: <p>Had a test site upgraded to 5.10.0 today, and the smart groups settings (for case contacts- see comment above) are now working as expected.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-08T04:14:24.680Z
Answers.Text: Unfortunately this didn't resolve my issue - I upgraded and cleared all of the caches, but the smart groups still won't save the "current member" criteria, or any changes that I make to membership criteria to either an existing group OR a new group.
Answers.UserDisplayName: LMK Web
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-07T15:04:28.833Z
Answers.LastActivityDate: 2019-02-07T15:04:28.833Z
Answers.UserDisplayName: Craig Almond
Body: <p>I've searched the archives and see there are a number of posts pertaining to smart groups not saving criteria, but it seems those were bugs addressed in updates, and we are running the latest version of CiviCRM (5.9.1).</p>
  <p>I have smart group made up of organizations whose membership is current (our memberships are company-based). However, I can't get the smart group to save the &quot;Is a current member&quot; search string. Instead, every time I update and save, it drops that setting and goes back to just &quot;Contact Type In Organization&quot; as the only criteria. This happens regardless of how I try to create or edit the smart group - it drops all selections from the Memberships tab. Is there a known bug or some other issue that could be causing this?</p>
  <p>Edited to add - the smart group count is also not updating when clicked - all of the smart groups still say &quot;unknown.&quot; Could this be a caching issue?</p>
  <p><strong>Edited 6/17/2020</strong> - still observing the same issue on CiviCRM 5.25.0. Interested to know if anyone else is having this problem.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-28T21:06:42.200Z
Comments.Text: would help if you could replicate this on dmaster.demo.civicrm.org as that confirms for others that this is a replicatable problem
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T00:01:49.050Z
Comments.Text: Can you please check if you have any custom civicrm php files setup that might need to be updated. You can check that on directories settings page here: http://example.com/civicrm/admin/setting/path?reset=1
Comments.UserDisplayName: Hassan Farooq
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T19:53:06.390Z
Comments.Text: @petednz-fuzion it seems that the Joomla master is down so I can't test on that at the moment. Is it worth trying to test on one of the other platforms?
Comments.UserDisplayName: LMK Web
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T19:55:23.843Z
Comments.Text: @HassanFarooq  We don't have any custom php files.
Comments.UserDisplayName: LMK Web
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-29T23:25:33.960Z
Comments.Text: since this sounds like core civi behaviour it should not matter which CMS you test it with.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-30T21:30:50.520Z
Comments.Text: Tested using the Drupal demo and did not observe the same behavior, so I'm open for suggestions what to try next.
Comments.UserDisplayName: LMK Web
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-06T16:51:12.950Z
Comments.Text: I'm having the same issue with cases and case start dates.
  
  Case type search settings are being respected by the smart group but the date filter is somehow dropped (currently Drupal, 5.3)
  
  Just looked at dmaster.demo (drupal, 5.11) and all works as expected/ hoped.
  
  Anyone know if the fix is in 5.10?
Comments.UserDisplayName: Craig Almond
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-02-08T05:44:21.503Z
Comments.Text: So to add another dimension - the smart group count is not being updated when I click that option. Could be related. I'll update my original post to note that.
Comments.UserDisplayName: LMK Web
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-17T20:57:42.073Z
Comments.Text: maybe add the Log Viewer extension if you want an easy way to access the error logs. https://civicrm.org/extensions/civicrm-log-viewer
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-08-28T19:22:06.223Z
Comments.Text: @petednz-fuzion Finally got around to installing the log viewer and these two errors show up consistently, but I don't know if they are related:
  [warning] Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems
  [warning] Deprecated function CRM_Core_BAO_Setting::setItem, use refer docs for correct methods https://docs.civicrm.org/dev/en/latest/framework/setting/
Comments.UserDisplayName: LMK Web
Tags: <smartgroups><advanced-search>
Title: Smart Group dropping search criteria on save
ThreadText: # Smart Group dropping search criteria on save
  
  (Asked by: username_0 on 2019-01-28)
  
  I've searched the archives and see there are a number of posts pertaining to smart groups not saving criteria, but it seems those were bugs addressed in updates, and we are running the latest version of CiviCRM (5.9.1).
  
  I have smart group made up of organizations whose membership is current (our memberships are company-based). However, I can't get the smart group to save the "Is a current member" search string. Instead, every time I update and save, it drops that setting and goes back to just "Contact Type In Organization" as the only criteria. This happens regardless of how I try to create or edit the smart group - it drops all selections from the Memberships tab. Is there a known bug or some other issue that could be causing this?
  
  Edited to add - the smart group count is also not updating when clicked - all of the smart groups still say "unknown." Could this be a caching issue?
  
  **Edited 6/17/2020** - still observing the same issue on CiviCRM 5.25.0. Interested to know if anyone else is having this problem.
  
  **Tags:** smartgroups, advanced-search
  
  > **Comments:**
  > **username_1**: would help if you could replicate this on dmaster.demo.civicrm.org as that confirms for others that this is a replicatable problem  
  > **username_2**: Can you please check if you have any custom civicrm php files setup that might need to be updated. You can check that on directories settings page here: http://example.com/civicrm/admin/setting/path?reset=1  
  > **username_0**: @petednz-fuzion it seems that the Joomla master is down so I can't test on that at the moment. Is it worth trying to test on one of the other platforms?  
  > **username_0**: @HassanFarooq  We don't have any custom php files.  
  > **username_1**: since this sounds like core civi behaviour it should not matter which CMS you test it with.  
  > **username_0**: Tested using the Drupal demo and did not observe the same behavior, so I'm open for suggestions what to try next.  
  > **username_3**: I'm having the same issue with cases and case start dates.  Case type search settings are being respected by the smart group but the date filter is somehow dropped (currently Drupal, 5.3)  Just looked at dmaster.demo (drupal, 5.11) and all works as expected/ hoped.  Anyone know if the fix is in 5.10?  
  > **username_0**: So to add another dimension - the smart group count is not being updated when I click that option. Could be related. I'll update my original post to note that.  
  > **username_1**: maybe add the Log Viewer extension if you want an easy way to access the error logs. https://civicrm.org/extensions/civicrm-log-viewer  
  > **username_0**: @petednz-fuzion Finally got around to installing the log viewer and these two errors show up consistently, but I don't know if they are related: [warning] Deprecated Path: There is a setting (generate_schema_and_data) not correctly defined. You may see unpredictability due to this. CRM_Core_Setting::setItems [warning] Deprecated function CRM_Core_BAO_Setting::setItem, use refer docs for correct methods https://docs.civicrm.org/dev/en/latest/framework/setting/  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2019-02-07. Score: 4
  
  Had a test site upgraded to 5.10.0 today, and the smart groups settings (for case contacts- see comment above) are now working as expected.
  
  > **Comments:**
  > **username_0**: Unfortunately this didn't resolve my issue - I upgraded and cleared all of the caches, but the smart groups still won't save the "current member" criteria, or any changes that I make to membership criteria to either an existing group OR a new group.  
  
  ---
  
  