editing works and alert if you try to add an empty post