Answers.Body: <p>This is a recent bug introduced by the fix to a different search issue, <a href="https://lab.civicrm.org/dev/core/issues/726" rel="nofollow noreferrer">issue #726</a>.</p>
  
  <p>A permanent fix will need to be found that doesn't break either scenario.  However, to resolve your immediate issue, you can open file <code>CRM/Contact/BAO/Query.php</code> and delete <a href="https://github.com/civicrm/civicrm-core/blob/5.14/CRM/Contact/BAO/Query.php#L3037" rel="nofollow noreferrer">line 3037</a>.</p>
  
  <p>I've reported this issue as <a href="https://lab.civicrm.org/dev/core/issues/1048" rel="nofollow noreferrer">#1048</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-15T15:23:00.760Z
Answers.LastActivityDate: 2019-06-15T15:23:00.760Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>in the latest versions of CiviCRM (5.13.4 and 5.14) we can no longer search for contacts that are not included in any group through the search builder!</p>
  
  <p>First (at least until version 5.12) with this search:</p>
  
  <p><a href="https://i.sstatic.net/zGpvW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zGpvW.png" alt="enter image description here"></a></p>
  
  <p>we obtained "all contacts that did not belong to any group", while now we give a a <strong>SINTAX ERROR</strong>.</p>
  
  <p>How to solve?</p>
  
Tags: <contacts><search-results><search-builder>
Title: (version 5.13/5.14) Search Builder syntax error when "Groups" "is empty"
ThreadText: # (version 5.13/5.14) Search Builder syntax error when "Groups" "is empty"
  
  (Asked by: username_0 on 2019-06-15)
  
  in the latest versions of CiviCRM (5.13.4 and 5.14) we can no longer search for contacts that are not included in any group through the search builder!
  
  First (at least until version 5.12) with this search:
  
  [![enter image description here](https://i.sstatic.net/zGpvW.png)](https://i.sstatic.net/zGpvW.png)
  
  we obtained "all contacts that did not belong to any group", while now we give a a **SINTAX ERROR**.
  
  How to solve?
  
  **Tags:** contacts, search-results, search-builder
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-06-15. Score: 4 | Accepted answer
  
  This is a recent bug introduced by the fix to a different search issue, [issue #726](https://lab.civicrm.org/dev/core/issues/726).
  
  A permanent fix will need to be found that doesn't break either scenario. However, to resolve your immediate issue, you can open file `CRM/Contact/BAO/Query.php` and delete [line 3037](https://github.com/civicrm/civicrm-core/blob/5.14/CRM/Contact/BAO/Query.php#L3037).
  
  I've reported this issue as [#1048](https://lab.civicrm.org/dev/core/issues/1048).
  
  
  ---
  
  