I decided to replace the fan with a new, quiet model. I'm a fairly handy guy and I'd already done the kitchen ceiling light quite easily, so I figured, no big deal.
It is no big deal. There are 2-3 wires coming down that actually go to the fan/light. Those are the only ones you touch. Easy peasy, and it's done.
These kinds of job are so simple they don't require a permit to be pulled.
There are 8 or 10 wires up there, all twisted together in 2 bundles. I figure one bundle is hot, the other is neutral. But the wiring is the old-style cloth-covered kind, and at this point, it all looks black. It's old.
It's a fair assumption that when you have two clumps of multiple wires, you're probably dealing with a hot clump and a neutral clump. Seems like a sensible guess; of course it's not conclusive.
Here's the important thing. When you see that presumably-hot clump and presumably-neutral clump, that circuit is carrying current onward to some other point-of-use. "It's not yours to disassemble" is probably the best way of thinking about it. Taking it apart won't help your project goal.
Serious, full stop, bad mojo.
Yes. Full stop. This where you exceeded your "personal minimums" and you should've buttoned it up and called for help. But you didn't because curiosity or "get-there-itis" got the best of you.
I carefully go through the painstaking process of separating the different wires and capping them individually. All circuits are broken, and it should be safe to keep them that way while I figure out what's going on.
Except, when I turn the power back on to test the wires, I find that 3 out of the 4 rooms of my apartment no longer have power. ... my neighbor was having electrical problems in his bedroom (which shares a wall with my bedroom).
That's no surprise to anyone with experience. This stuff wasn't broken, and fussing with it didn't advance your goal. You have to admit curiosity was your motive.
So, this clues me into the fact that the live wire is probably a circuit on his fuse box. This weekend, we plan to test his breakers as well to see if we can isolate the live wire and get it turned off.
My electrical knowledge doesn't stretch so far as to where to go from there.
No. Sit down. You are done.
I'm about to say something I don't often say. There are reasons.
I. You are doing unauthorized electrical work in a rental unit. Even if the landlord authorized the fan swap, you could have simply cut the modern-ish wires from the old fan (it's scrap) and spliced those to your new fan with orange wirenuts. You went way past the landlord's possible permission or intent.
II. The extra work crossed the threshold between "trivial work" and "actual electrical work that requires a permit". So you are doing unpermitted work, with consequences all their own, and those consequences fall on the landlord.
III. Most everywhere, only licensed contractors can work on rental units. The landlord can't fix the electrical. The landlord's handy cousin can't fix the the electrical. The tenant sure can't! When unlicensed contractors do work on rental units, the consequences fall on the landlord.
IV. As you readily admit, you're well beyond your depth. You should not have done this. The cure is not "do more". You may think "if I can only try every combination, I'll get it" - no, you'll get an apartment fire. Where did the rule When you are in a hole, STOP DIGGING come from? Don't people realize they are messing up? Well... no. People get tunnel vision, puzzle-solving mode, or get-there-itis. If it can happen to the chief KLM pilot at Tenerife, it can happen to any of us.
Now you call in the professional
Life as a consumer is funny. I can walk into Home Depot and they will take back something I bought at Lowes, even though I damaged the packaging so it's no longer saleable. You get really used to that and it can be a total shock when others don't eat your losses for you. This is one of those. Simply put: This is on you. All the way. Soup to nuts. Simply put, you poked it, and now the consequences of poking it are yours.
You call the landlord and you ask which electricians he prefers. You call up those guys and say you "messed up" and need one to come out PDQ. S/he comes out. They bother your neighbor a couple times, drape wires around your apartment for testing.
Expect this to take a couple hours, if everything goes well. The bill will be Very Ouchy if you're not in the habit of paying electricians. You pay it on the spot. The landlord never knows the bill. One time I had to do this with a very boutique porch light globe I accidentally smashed. The phone call went like "You (landlord is architect) specced the porch light, right? It's an Adams J101, do you know who supplies those?" "Anderson Distributors in the city." "Thanks." That was the last he heard of it.
Now it's possible it won't go well. Your poking may have brought it below condemning limits. It may have been "grandfathered" in Code and now it's not. Or it may have been improperly wired in the first place (not least, the other tenant's power in your box? WTH? Scary!) and that must be fixed because it can't be returned to service that way. Any of these could make this bill a fair bit bigger. Unfortunately, that's just tough. If it was defective before you came along and the electrican can tell your landlord that, you might get him to share costs. That's the most you can expect.
By the way, the thing I almost never say is "hire a professional". In this case it's right for reasons I-IV above.
One last thing: Find out what the bedroom neighbor likes (cakes, tequila, Cold Stone) and get her something really nice.
Best Answer
Mistakes were made. It happens.
taking apart apart all the wires instead of just the 2 conductors the lamp was actually attached to (other than ground). This happens a Lot.
not taking photos before the fact.
"White" is a color. "Neutral" is a function. Confusing them. The trouble is, cables are manufactured only with certain colors (white and black), and you are stuck with those colors even though the wires will in fact have a variety of functions.
Ideally, you re-mark the wires with colored tape - black for hot, red for switched-hot, yellow for messengers, blue/purple/green/etc. for alternate hots, or whatever scheme you prefer. However the vast majority of "in a hurry" high-production installers never do that.
Now in residential cables, there are special rules: white/gray can be reused/remarked as hot wires, but colored wires cannot be reused as neutrals. Nothing can be remarked as a ground, and green/bare can't be remarked, so green tape on a black wire makes it still a hot.
In a switch loop, it's common practice (and now Code) to make the white the always-hot, to help the next guy identify it as not a neutral (since a voltage tester will reveal hot all the time, even if the switch is off.) The other wire in a switch loop is switched-hot, neutral is not present, (but is now required in new construction to support smart switches).
"switch loop" is the word I want you to Google, because this is where things went wrong in this setup. One of the wires coming back from the switch is actually "switched hot", as is the hot wire to the lamp obviously. Mark those red. Once you have done so, then you can match by color.