I know switches get stuck all the time on my old cars, but I couldn't figure out for the life of me where they were in the new cars. Evidentlty they are now part of the door latch now a days after looking it up.
My wife's Territory had had this very same problem. couldn't lock the car, and would of had to put it in a lock up garage until monday if this didn't work, but thankfully it did work!
I found the answer for an american car called the lincoln, but it worked brilliantly on my wife's Ford Territory just now. But I used RP7 and then Inox sprays rather than what he had. Still worked fine.
FIXING THE "DOOR AJAR" MESSAGE
Submitted by Steve L and pro-five-oh / 11-07-04
If you find your Lincoln giving you this message even when you know the doors are closed, don't worry! This is a minor problem with a very simple solution.
The problem is that there is a sticky switch in the door latch mechanism. This switch is telling the computer that a door is open, even when it is not. Keep in mind that it may not be the driver's side door that is at fault, so you might want to do all 2 or 4 doors, depending on your model.
At each door you will see the latch mechanism. Just above these latches inside each door is the switches. To unstick these switches you will need 2 types of spray lubricant. Use WD-40 (or equivalent) and a can of silicon spray lubricant.
With the plastic tube attached on the WD40 you will spray inside the latch and in between the latch to get the spray to lube the switch. Flooding is preferred. Go to each door and do this. Open and close each door multiple times until the switch is free and the indicator lamp goes out and the monitor message does not appear.
Next apply the silicon lube in the same fashion. Why is this necessary? WD-40 loosens and penetrates to unstick the switch. Later it will become tacky and cause the switch to stick again. The silicon spray lube will wash away the WD-40 and replace with a silicon coating that will not cause stickiness as it dries. Be sure to get between the door latch and door metal and spray upward this is the best way with no door disassembly required.
And if that doesn't work:
Look at the wiring harness, where it goes from the door into the car body.
I found the seal had come adrift once before which caused problems with the window switch. If the connector inside the seal got wet. Which happened after going thru a big puddle once in the Territory. For some reason Territorys throw the water forward and over the bonnet, so water ingress at this point is always possible if the rubber seal has come away from the body work.
Give that a through cleaning with a terminal connecter spray to get rid of the water and dry it out as best you can then repack the seal and refit the connector bottom first, which should give you a good watertight seal.
It's a bit fiddly for the front door as you don't have much room. Fixing the rear door seal is far easier as it's in the centre pillar and is accessed from the front rather easily. Water in either of these connectors thru a bad seal can also cause the door ajar signal on the dash to stay on when the door is actually shut.
This causes the interior light to remain on and an inability to use your key or remote control to lock the car nor set the alarm.
The switch or the door wiring harness should be the first suspects if the dash indicator is only asignalling one door being the culprit.
Same thing for the rear door/hatch. Much the same set up. Switch in the mechanism and seal for wiring throu the top of the door into the car body.
If all door report faulty then try and eliminate one, and if that doesn't work then you'll have to consider the fuses, dashboard central lock switch, key fob remote control or onboard computer.... good luck