Old Wiring to New Light Fixture With Switch
Sounds like you have your switch leg ( switch loop ) mixed up.  You need to isolate it.  It is the wire going to the switch.  A simple continuity test will determine which wire is the switch leg. You need a continuity tester and most voltage testers check continuity.  As for the ground, there is none available unless you provide a new circuit to the panel assuming it is grounded correctly.  Since there is no ground you can remove the fixture ground to avoid any potential problems and to save space.

Here is an example drawing I made (Revision 2):