Make WordPress Core

Opened 8 years ago

Last modified 7 years ago

#39158 new defect (bug)

Unify site deactivation process

Reported by: flixos90's profile flixos90 Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords: needs-patch 2nd-opinion
Focuses: multisite Cc:

Description

Currently there are three cases of "deleting" a site on a multisite setup:

  • deleting a site entirely (for example via Sites list table's "Delete" link)
  • deactivating a site from the network admin (for example via Sites list table's "Deactivate" link)
  • deactivating a site from the site admin (admin can click "Delete Site" in Tools menu)

Note that deactivating a site does not wipe out the site, but rather sets the "Deleted" flag for that site (strange legacy naming, can be ignored here).

What this ticket should solve is that the latter two processes work differently although they should be doing the same thing: While deactivating a site from the network admin simply sets the site to "Deleted", deactivating the current site from the site admin also removes all users from the site (via wpmu_delete_blog()). That means if an admin deactivates their site and later asks support (i.e. the network administrator) to restore it, all users will be gone.
I'm not sure why this happens, but I certainly don't think the two actions should have a different behavior. My proposal is to move the part of that function where users are removed into the if ( $drop ) clause to make sure users are only removed when the site is actually being deleted.

Change History (7)

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


8 years ago

#2 follow-up: @flixos90
8 years ago

  • Keywords needs-patch added

As discussed during today's bug scrub, we can move forward with this. Let's only focus on providing parity between the two ways of deactivating a site (users must not be removed from a site that is being deactivated from the site administration panel).

A separate ticket to make the terminology "Deactivate" vs "Delete" more clear should be opened as well. These changes should not be addressed here.

#3 in reply to: ↑ 2 @thomaswm
8 years ago

Replying to flixos90:

A separate ticket to make the terminology "Deactivate" vs "Delete" more clear should be opened as well. These changes should not be addressed here.

See #15801.

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


8 years ago

#5 @flixos90
8 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from 4.8 to Future Release

Let's come back to this in a future release.

#6 @flixos90
7 years ago

Related: #17164

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.


7 years ago

Note: See TracTickets for help on using tickets.