Custom post edit page permalink links to edit page rather than the post

Custom post edit page permalink links to edit page rather than the post