WP-2879 Added redirect and error message on invalid url for edit and delete