The issue with "localhost" is in the Site's settings, you probably have the Presentation URL property set with
http://localhost. When this is in production, this will not work. It needs to be the actual domain URL. While debugging locally on your machine, it can be set to localhost but if you share a database with anyone else it may cause problems for them as well.
Regarding the template issue, I'm not 100% sure what would cause that.