Forum OpenACS Q&A: Response to Error: can't read "query" no such variable while....

It's probably a dead end wading through code to find the source of that error - it's most likely a configuration issue rather than a problem with the ACS 3.4 source code.

Make sure you have no errors in your AOLserver error log.

I notice you're using AOLserver 3.4.2. The recommended version is 3.3+ad13 (available on this site). You could try that and see if the problem disappears. If not, post the contents on your AOLserver config file, it could be something simple in that.