Answers.Body: <p>I finally found that my problem was a SQL one not a CMS one. The where conditions grouping were the source of the problem. </p>
  
  <p>Here is the final code I used.</p>
  
  <p><a href="https://gist.github.com/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41" rel="nofollow noreferrer">https://gist.github.com/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-14T19:45:30.253Z
Answers.LastActivityDate: 2017-06-14T21:14:55.317Z
Answers.LastEditDate: 2017-06-14T21:14:55.317Z
Answers.UserDisplayName: Nicolas Binet
Body: <p>I’m having a problem modifying an ElementCriteria with buildElementsQuery.
  The results elements totally mixes locale results. I can only get english URL for example.</p>
  
  <p>Here is a gist of my code.
  <a href="https://gist.github.com/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41" rel="nofollow noreferrer">https://gist.github.com/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41</a></p>
  
  <p>is there something particular to do when using buildElementQuery ?</p>
  
  <p>Nicolas</p>
  
Tags: <elementcriteriamodel><query>
Title: Trouble with buildElementQuery customization
ThreadText: # Trouble with buildElementQuery customization
  
  (Asked by: username_0 on 2017-06-14)
  
  I’m having a problem modifying an ElementCriteria with buildElementsQuery.
  The results elements totally mixes locale results. I can only get english URL for example.
  
  Here is a gist of my code.
  <https://gist.github.com/username_0/7e3835b13c3e9c21d2fa754243242b41>
  
  is there something particular to do when using buildElementQuery ?
  
  username_0
  
  **Tags:** elementcriteriamodel, query
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-06-14. Score: 1
  
  I finally found that my problem was a SQL one not a CMS one. The where conditions grouping were the source of the problem.
  
  Here is the final code I used.
  
  <https://gist.github.com/username_0/7e3835b13c3e9c21d2fa754243242b41>
  
  
  ---
  
  