Trouble with buildElementQuery customization 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/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41

is there something particular to do when using buildElementQuery ?

Nicolas
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/nicolasbinet/7e3835b13c3e9c21d2fa754243242b41