Too many wires! Ceiling fan
So this question is in line with the other other ceiling fan wiring questions. I am trying to install a ceiling fan. The light box has four cables (each with a black, white and bare wire). It seems that one cable is always hot, one cable goes to the adjacent bathroom, one cable seems to connect to some wall plugs and the other I anyone's guess. I was told that I should bundle all the blacks, whites and grounds together and connect it as if these were one black, white and ground. When I do this, eveything is fine unless I turn the wall switch off. This trips the breaker.
I would be eternally grateful for any hints, comments or advice.