Intermittent power door lock problem

I have a 97 Dodge Caravan and the door locks are doing something very odd. When the door is open the locks will not work at all from either side, but when the doors are shut both I can only get the doors to lock. This started about a day and a half ago.

I don’t find that odd at all, except for the fact you said this started a day and a half ago.

Both my '02 Tahoe and '04 Toyota Matrix locks work that way.

Funny thing is now they work OK, hence the intermittent part. Any suggestions as to what might cause this?

Some vehicles do this deliberately when the key is in the ignition to make it harder to lock your keys in the car. The key wasn’t in the ignition, was it?

It sounds like there is a broken wire in the door jam on the driver’s side. It sounds like the wire that provides power to the locks may be intermittent. I think the short harness inside the jam is replaceable since it is a common ware point.

That was going to be my second guess if the OP answered “no” to my question above, but I decided to wait for an answer to my question before I threw it out there. My third guess is a faulty ignition switch that thinks the key is still inserted.

No the key wasn’t in the ignition, and that never had an effect on whether I could lock the doors anyhow…although I am familiar with cars that have that feature, this one is not one of them.