Where did these NPCs go?
A couple of NPCs in Riften seem to be permanently missing: The stable owner, and the priest at the Temple of Mara who carries out marriages. Now I can't buy a horse from that particular stable, and can't become married.
Is this a bug, or have they died? I remember a dragon attack outside of the city and possibly going on a rampage as a werewolf. If they are dead, is there any way at all to revive them?
Solution 1:
Maramal's RefID is 00019DD5
.
So I would try:
resurrect 00019DD5
player.placeatme 00019DD5
enable 00019DD5
Hofgrir Horse-Crusher's RefID is 00019DFE
; the same should work for him.
Solution 2:
It is most likely a dragon attack. Check the area surrounding the city for their corpses. If you find them dead, and play on the PC, then you can use the console to resurrect them.
To resurrect an npc (enemy or friendly), walk up to them, open the console, click on their corpse (you'll see an npc code pop up in the center of the screen), then type resurrect and hit enter. They'll pop right up like nothing happened. If they're hostile, they will attack you.
If they don't pop right up after that, you probably misclicked their corpse, and got an item code for something near them. In this case, try clicking around till you get a different code, then try to resurrect them again.
Edit: Be careful when using placeatme as @agf suggested, it has created duplicate npc's in the past. You can get rid of these by selecting the unwanted npc while in the console window and then typing disable -> enter.