Pull the connectors apart at the bumper and make sure none of the wires have pulled out at all. Mine was a wee bit short, and would pull on the harness on hard jacknife turns, causing your problem.

Everybody else is correct about trailer wiring being crap. It could be anywhere.