Add view_post controller and fixed warning cases