modify edit page and add errorpage