Voltage not detected on either switch terminal when switch is turned on
This has all the smells of a switch in the neutral wire, which is a no-no as it's a potential shock hazard for a clumsy bulb changer, and forbidden by NEC 404.2(B):


  (B) Grounded Conductors. Switches or circuit breakers shall not disconnect the grounded conductor of a circuit.


The reason why the voltage detector turns off when the switch is on is because when the switch is on, the switched wire is effectively connected to the grounded conductor, putting it a few volts above earth ground.  When the switch is off, though, there's no current flowing, so the switched wire "floats" at mains voltage, which is picked up by your detector.