Make WordPress Core

Opened 4 years ago

Closed 7 months ago

#51358 closed enhancement (fixed)

Add a clearer warning message before deleting a site from a network

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 6.6 Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: has-screenshots has-patch needs-testing
Focuses: administration, multisite Cc:

Description

Deleting a site from the Network Admin -> Sites screen is the most destructive single action that a user can take on a WordPress installation.

After clicking the Delete link the user is shown a screen requesting confirmation, but this screen doesn't convey the permanence of the action they're about to take.

There is no trash or undo when deleting a site. It drops the database tables for the site, empties its uploads directory of all files, and removes the roles for that site from all users.

Let's add an extra warning to this confirmation screen which explains this.

Attachments (5)

51358.diff (1.2 KB) - added by johnbillion 4 years ago.
Screenshot 2020-09-19 at 21.44.58.png (58.6 KB) - added by johnbillion 4 years ago.
51358_sentence_case.diff (1.2 KB) - added by kebbet 4 years ago.
51358.2.diff (1.2 KB) - added by cafenoirdesign 13 months ago.
Refresh for existing patch
51358.3.diff (1.2 KB) - added by cafenoirdesign 13 months ago.
A patch with strong tags instead of <b> tags.

Download all attachments as: .zip

Change History (24)

@johnbillion
4 years ago

#1 @johnbillion
4 years ago

  • Keywords has-patch added; needs-patch removed

51358.diff adds an extra warning to the confirmation screen when deleting a site, and changes the submit button text for further clarity.

#2 @johnbillion
4 years ago

  • Keywords has-screenshots added

#3 @johnjamesjacoby
4 years ago

This is a big +1 from me. I love the patch. It’s a nice improvement.

I’d like to see more here! What if we added a little summary of all the things you mentioned in the ticket description? An indication of the irreversible destruction that’s about to happen might provide enough context to make this screen perform its intended function better, avoiding unintended catastrophic data obliteration.

Deleting this site will irreversibly delete the following:

  • 200 posts
  • 64Mb of media
  • 7 user associations

The following plugins are currently active on this site. Use these to help with deciding if deleting this site is still OK.

  • bbPress
  • Sugar Calendar

#4 @kebbet
4 years ago

  • Keywords needs-patch added; has-patch removed

There is a strive towards using sentence case in core from my understanding. I think the button text should be “Delete this site permanently”.

Thanks!

#5 @johnbillion
4 years ago

@kebbet Thanks, is that documented somewhere? I copied the button text from the button on the Tools -> Delete Site screen.

@johnjamesjacoby That's a really interesting idea but I wonder whether it would make the screen a bit too busy?

#6 @kebbet
4 years ago

@johnbillion I guessed that question was coming ;) A quick search on trac for ”sentence case” results in some tickets, but I could not find an announcement on the topic.
whyisjake states it here e.g. https://core.trac.wordpress.org/ticket/40244#comment:22
Another ticket on the topic #51371

#7 @kebbet
4 years ago

My first patch ever, downloaded the previous one and edited it. Maybe I did it in an incorrect way, happy for any feedback :D

#8 @johnbillion
4 years ago

I just realised this doesn't cover bulk site deletion.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


4 years ago

#10 @hellofromTonya
4 years ago

  • Milestone changed from 5.6 to Future Release

During today's scrub, @johnbillion noted there's more work to do and to punt this one to Future Release.

If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

#11 @Mista-Flo
22 months ago

  • Keywords needs-refresh has-patch added; needs-patch removed

#12 @joedolson
15 months ago

  • Milestone changed from Future Release to 6.5
  • Owner set to joedolson
  • Status changed from new to accepted

@cafenoirdesign
13 months ago

Refresh for existing patch

#13 @cafenoirdesign
13 months ago

  • Keywords needs-refresh removed

#14 @Mista-Flo
13 months ago

Hey @cafenoirdesign, good patch, thanks for the work, it looks pretty solid.

That being said, I'm not sure about the use of <b> tag, it became pretty standard to use <strong> instead if you wanna keep it.

@cafenoirdesign
13 months ago

A patch with strong tags instead of <b> tags.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


10 months ago

#16 @audrasjb
10 months ago

  • Keywords needs-testing added
  • Milestone changed from 6.5 to Future Release

As per today's bug scrub and since tomorrow is WP 6.5 beta 1, let's move this ticket to Future Release to give it time for testing.

#17 @joedolson
10 months ago

  • Milestone changed from Future Release to 6.6

#18 @johnbillion
8 months ago

  • Owner changed from joedolson to johnbillion

#19 @johnbillion
7 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 58098:

Networks and Sites: Add a clearer warning message before deleting a site from a network.

Props johnjamesjacoby, kebbet, cafenoirdesign, Mista-Flo, johnbillion

Fixes #51358

Note: See TracTickets for help on using tickets.