I tried this but the plug won’t budge unfortunately. I think it’s been too badly damaged previously. A great deal of brute force might shift it but I’m afraid of doing that in case I ruin it can can’t reconnect it. I tried clipping the plug/socket back into the back of the headlight. Definitely had it the right way round (there’s a tab that prevents it going any other way) but it just springs out. Again I wonder if something’s broken. Some gaffer tape might hold it and seal it, that would be a real bodge but can’t think of anything else.It only fits in one way round, perhaps you had it upside down. The plug can be a pain to remove, I put a small screwdriver into the release lever to lift the tang over the barb. While holding in the screwdriver I use a large flat bladed one on the long edge next to where the release is alternating on either side until it starts to come off. Once over the barb it is just the internal rubber seal that is holding it together. A lage flat blade screwdriver on both sides now usually pops it off.