It sounds wrong to me, but I couldn't be sure without actually being there. You should connect the new fixture, in exactly the same way the original fixture was connected.
If there wasn't a grounding conductor in the original circuit, replacing the fixture did not make one magically appear. If a grounding conductor is required, you'll have to install one in accordance with local codes.
This answer is for North America, with U. S. wiring colors.
Do not attempt this unless you are confident you can learn the path and purpose of every wire. You should use both a continuity tester and a voltage detector, such as a small light bulb, that draws some actual power from the circuit under test.
You are looking at a ceiling junction box with three cables, each with a ground (bare, green, or green/yellow), white, and black wire. Most likely BUT TEST TO MAKE SURE one cable is the power source, one goes to the switch, and one continues on to deliver to another junction box.
You need to figure out which cable is which.
![ceiling junction box with all the wires pulled out and not labeled](https://i.stack.imgur.com/wSaIa.jpg)
First -- with the power on, carefully test each black & white pair for the presence of line voltage. One of these pairs will light your lamp; the other two will not. If you get any other result, stop and call an electrician. Remember which pair has power. Turn off the circuit breaker again.
Next -- use your continuity tester to find which cable goes to the switch. You don't need to disconnect the switch for this, but it's easier if you turn it off.
The remaining cable continues to the next junction box and provides power to another part of your house. You should have noticed by now that some of your outlets and lights stopped working when you ripped these wires apart. If you do not see this condition, stop and call an electrician. Use your continuity checker to prove that this cable is connected to the dead outlets and lights.
When you are very confident that you know what loads are powered by this cable, connect it to the power cable, white to white and black to black, and flip on the circuit breaker. Check that the dead outlets and lights are now working. If you get any other result, stop and call an electrician.
Turn off the circuit breaker.
Now connect all the grounds together. I like to include a connection to the junction box, if it is metal.
Connect the white wire from the switch to the black wire from the fixture. Mark both ends of this white wire with colored paint or tape.
Connect all the remaining white wires together.
Connect all the remaining black wires together.
You should end up wired like this:
![typical feed through ceiling fixture circuit](https://i.stack.imgur.com/hGMuJ.jpg)
Best Answer
It's difficult to tell for sure, as I'm not sure where all the wires in the box go. But it looks like the lights are run in series, rather than in parallel as they should be.
To fix it.
This image shows how electricity moves through the circuit.
Notice that the neutral wire "coming back from" light
B
connects to the hot wire "going to" lightA
. Then the neutral "coming back from"A
, connects the the other circuit neutrals.The only way that this wiring would make sense, is if
B
was a switch controllingA
.removing the bulb from either
A
orB
interrupts the circuit, and causes both light to go out.