I was just testing the comment preview, and noticed that it displays HTML that isn’t allowed when the comment is actually submitted. Just to be sure, I posted a comment to Plugin Experiments, saw how it displayed, and went to delete it.

Somehow I accidentally deleted the post instead of the comment.

Fortunately I still had the page open and was able to copy and paste it into a new entry. Even better, I was able to backdate it to the original time. Even better, since all the links are based on the date and title of the post instead of its database ID, the fact that it’s a new post is both irrelevent completely undetectable.

Well, it would have been undetectable if I hadn’t posted about it, anyway.

From what I can tell, what happened is this:

After looking at the comment, I followed the link to edit it, then hit the Delete Comment button. The thing is, when you delete a post, it asks for confirmation. When you delete a comment, it doesn’t. It just goes straight to a page listing the post it was attached to. With a delete button. And because I was expecting to confirm the comment deletion, I went for it.

So between the fact that I wasn’t paying enough attention and the fact that WordPress is inconsistent in requiring confirmation, I nearly lost a post. Time to report another bug…

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.