Answers.Body: <p>It has been reported here <a href="https://github.com/civicrm/civicrm-core/pull/17622" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/17622</a> and it should be fixed by the <a href="https://github.com/civicrm/civicrm-core/blob/5.26/release-notes/5.26.2.md" rel="nofollow noreferrer">CiviCRM 5.26.2</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-15T16:48:41.933Z
Answers.Text: We just started experiencing this error in 5.29.0, is anyone who previously had this issue experiencing a regression, or is there possibly a new error now? (we went from 5.25 to 5.27 so never experienced this previously)
Answers.UserDisplayName: freeform.steph
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-16T12:02:34.960Z
Answers.LastActivityDate: 2020-06-16T12:02:34.960Z
Answers.UserDisplayName: Francesc Bassas i Bullich
Body: <p>Viewing some Smart groups (not all) causes DB error. </p>
  
  <pre><code>[error] $Fatal Error Details = Array
  (
  [callback] =&gt; Array
      (
          [0] =&gt; CRM_Core_Error
          [1] =&gt; exceptionHandler
      )
  
  [code] =&gt; -2
  [message] =&gt; DB Error: syntax error
  [mode] =&gt; 16
  [debug_info] =&gt; INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
  [type] =&gt; DB_Error
  [user_info] =&gt; INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
  [to_string] =&gt; [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]"]
  )
  </code></pre>
  
  <p>I think, this error is since the last, 5.26.1 update. </p>
  
  <p>Has someone this problem, too? </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T17:38:02.883Z
Comments.Text: Recently upgraded from 5.20.3 to 5.26.1 and having similar issue. With the addition that the affected smart groups are used for user ACL management.
Comments.UserDisplayName: Francesc Bassas i Bullich
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T17:46:15.063Z
Comments.Text: As it is a possible regression I notified the Product Maintenance channel https://chat.civicrm.org/civicrm/pl/xim58dupridbuqxypdysda3eyr.
Comments.UserDisplayName: Francesc Bassas i Bullich
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-15T23:41:18.993Z
Comments.Text: Does these groups have any parents or children?
Comments.UserDisplayName: Francesc Bassas i Bullich
Tags: <error><smartgroups>
Title: Smart Group DB error
ThreadText: # Smart Group DB error
  
  (Asked by: username_0 on 2020-06-12)
  
  Viewing some Smart groups (not all) causes DB error. 
  [error] $Fatal Error Details = Array
  (
  [callback] => Array
      (
          [0] => CRM_Core_Error
          [1] => exceptionHandler
      )
  
  [code] => -2
  [message] => DB Error: syntax error
  [mode] => 16
  [debug_info] => INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
  [type] => DB_Error
  [user_info] => INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
  [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT IGNORE INTO civicrm_tmp_e_gccache_554616ac5a2e5773984de236f4af031e (group_id, contact_id)  [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]"]
  )
  
  I think, this error is since the last, 5.26.1 update. 
  Has someone this problem, too?
  
  **Tags:** error, smartgroups
  
  > **Comments:**
  > **username_1**: Recently upgraded from 5.20.3 to 5.26.1 and having similar issue. With the addition that the affected smart groups are used for user ACL management.  
  > **username_1**: As it is a possible regression I notified the Product Maintenance channel https://chat.civicrm.org/civicrm/pl/xim58dupridbuqxypdysda3eyr.  
  > **username_1**: Does these groups have any parents or children?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-16. Score: 4 | Accepted answer
  
  It has been reported here <https://github.com/civicrm/civicrm-core/pull/17622> and it should be fixed by the [CiviCRM 5.26.2](https://github.com/civicrm/civicrm-core/blob/5.26/release-notes/5.26.2.md).
  
  > **Comments:**
  > **username_2**: We just started experiencing this error in 5.29.0, is anyone who previously had this issue experiencing a regression, or is there possibly a new error now? (we went from 5.25 to 5.27 so never experienced this previously)  
  
  ---
  
  