As above, most likely broken wires inside the rubber sleeve that runs from the roof to the tailgate... open the tailgate, locate the rubber sleeve (next to left hand hinge) pull back the rubber sleeve, to expose the wires, and inspect carefully (they break because of the movement on the wires, when opening, a closing the tailgate.. bridge any breaks with a new piece of wire, soldered, and heat shrunk into place...
Thom