I have seen this happen numerous times. The solution is always that the linkage has come out of the back of the lock cylinder. The idea is that when you turn the key, it moves a long wire inside the door and this is connected to the unlock sensor. If the wire falls out, somebody or something has to put it back in (duh duh duh DUH!)
A warning: If you try to put it back in, you will possibly scratch or crack the plastic panel of your door. Most cars require that you unscrew lots of screws and then pry off the plastic to get inside the door. Then there is the possibility of deploying an airbag in the door. Taking a door off can be a minefield. You can get a plastic tool from auto part stores for (more) safely removing plastic parts, and if you don’t do anything stupid you probably won’t trigger the airbag.
Once you have the plastic off, just look at the back of the lock. If there is plastic in the way, it is easy to peel back. It is glued down and if you are careful about how you peel it up you can put it back the same way with no tears. I hope you have the window rolled up! The lock is probably to the side of the window anyway. If you have a problem rolling your window up, while you have the panel off you could replace the motor for your window. Back to the lock. If the linkage has fallen out, look at the back of the lock and see the connector that hopefully is on the back. Then look around below the lock for a loose wire that seems out of place. If you find one, does it connect back to the lock in some obvious way? Don’t just stick it back on there or it might just fall out again.
I recommend using some 200 mph tape, known to residents of the lower 48 as “duct tape”. It won’t degrade with hot and cold weather cycles like other fixes I have seen (rubber bands? Please!)
Of course, check to see if it works once you have reconnected it. Usually this entails sticking a wire into a plastic wire holder and then wiring it in there or taping it in. Then stick your key in and turn. You should be rewarded with the sound of your lock(s) unlocking, assuming your battery is good and you have that type of car. Otherwise, your reward may take some different but familiar form like the normal sound of your car unlocking. Whatever. If it works, it is time to reattach the plastic fabric that is used to keep the inside of your door moisture free. Make sure that there are no tears. If there are, you are going to want to tape those shut. Make sure you don’t leave any tools in there. Make sure that everything works right including the windows, and that your door will shut and open properly.
Now it is time to reattach the plastic cover for the door again. You will probably have to reattach some electric connections if you have electric locks and windows, maybe some speaker wires. Then snap it back on without cracking brittle plastic snap connectors. The Russians I bought my car from snapped off at least one connector for every plastic part of my car I think, and also some metal ones!
That said, you don’t need every plastic connector. The screws will hold the door on well enough. You can probably buy some of these plastic snap connectors from an auto parts store or fleabay. I never bothered to repair these and just live with the car I bought from the Russians, who wired the plastic panels back on when they broke all the tabs off.
I am not sure how they did it either because it is actually really hard to cut the wires.
They must have wired the dash panel on from the firewall or something because I can barely pry the panel back enough just to nip the wires off! Russian ingenuity, I will never know. They beat us to space somehow, no doubt using similar technologies.