I have limited internet access and played through Portal without being online. As a result, several of the achievements didn't unlock. I later went back and played through a second time online to try and get some, but they wouldn't unlock. Some of these achievements include: "Cup Cake", "Fruit Cake", "Vanilla Crazy Cake", and "Camera Shy". How can I unlock these achievements if they won't register?
Open the developer console (the ``
key; you'll have to enable it in the Advanced menu of the Keyboard settings) and enter indeveloper 1
(possiblydeveloper 4`) and try to do something that would count towards an achievement like Camera Shy. Usually some text will pop up in the console about it, and it might give you some insight as to why they aren't unlocking.
Make sure that you aren't using the commentary mode as well, which disables them. Worst case, perhaps try a full reinstall of the game.