An error occurred while attempting to perform the SOQL query

In that case, it sounds like there may be something about this page that is causing the issue.  

If that’s true, here are a few troubleshooting suggestions to try, using a clone of the page:

  • Set up a new simple page that queries the same object, with the same model setup. If the same issue happens for this user on the new page, then it's likely that the problem is related to a Salesforce setting or permission. If not, then continue on.
  • Remove all custom Javascript from the clone and see if the issue persists for this user. If the SOQL query string looks correct after removing the JS, then try removing one JS resource at a time to see which one may be causing trouble. 
  • If removing all Javascript doesn't resolve the SOQL query issue, then restore it. Use the XML editor to 'brute-force' your investigation. Comment out sections of the XML and reload the page as the affected user, to check if the SOQL query string looks correct or not. Try commenting out any action sequences (towards the end of the XML), or other models besides the affected model.