Sidebar trash button gets rendered late + does not require confirmation + takes long time to redirect, can lead to accidental deletion of a published (home) page without the user knowing it happened #34436
Labels
[Feature] History
History, undo, redo, revisions, autosave.
General Interface
Parts of the UI which don't fall neatly under other labels.
[Type] Enhancement
A suggestion for improvement.
[Type] Performance
Related to performance efforts
Description
This is a description of a scenario that happened to me for the home page, luckily on a test environment, while trying to navigate to the revisions to restore an earlier version. I attached a video where I re-enacted this scenario. The first 20 seconds contain the following steps, after that are the steps needed to restore the home page.
Especially in case of the home page this has a nasty effect. The home page setting gets reverted to the default WP post listing. You need to go to trash, un-trash the home page, edit the home page to re-publish it, and then go to Appearance > Customize > Home Page Settings to re-select it as the home page. Before completing those steps your home page will likely look very broken.
In this case I noticed it had happened because I wanted to restore a revision. But imagine if a user just wanted to check a revision without restoring it, and closed his browser after checking the revision. This user would not know that he just trashed the home page of his live site.
There's a few things going wrong here, the most important one being that the trash button will trash any published post, even if it's the homepage, without confirmation. A destructive action on published content like this should require a confirmation that makes it almost impossible to do by accident.
Other possible improvements:
Step-by-step reproduction instructions
Screen recording
The issue is only the first 20 seconds of the video, afterwards is included to show the effect on the home page and the steps needed to restore it.
accidental-home-page-deletion-reenactment.1.mp4
Environment info
WordPress version: 5.6.4 (but I think it can happen on any recent WP version)
Not using the Gutenberg plugin, so we're using the Gutenberg version shipped with 5.6.4
Pre-checks
The text was updated successfully, but these errors were encountered: