Matthieu, could you please check whether the current trac version in Debian (0.11.5-4) still does not work correctly for you? I use trac since some time on Debian and did not come across the custom query problem (and I use them heavily). I would like to close this bug. Thanks! W. Martin Borgert