Originally Posted by
donf
Not to panic!
You need to do some cable identification.
Find the Supply cable and isolate from the others. Find the switch cable and isolate that.
Now, depending on the colors of the switch cable, connect the supply black to the white wire going to the switch. Wrap this white wire with black electrical tape to identify it as a hot conductor.
Take the black conductor from the switch and attach it to the black on the light fixture.
Now, connect the light's white to the ceiling white. And finally connect all ground wires together.
Please let me know if this works. If it does not, please up-load a photo of the ceiling wiring and the switch wiring.
If there are things that are still not working, and you have an extra black conductor or an extra black and white conductors, connect the extra black to the ceiling supply and the extra white to the ceiling white (Neutral)