This... seems to be a bug I don't have.
I mean i play in Sulani, and except when an Event (like the Welcome wagon or when neighbors are nice and bring food or a yard sale) or they have been given a key, they always knock. Even with the door unlocked they knock.
Sims that have been given resident keys just walk in like they owned the place, but that's meant to be that way.
Also (but again I play in Sulani) if i throw a party about 5 more guests just show up uninvited and crash the party. Again, that's Sulani so that's okay.