Opened 2 years ago
Closed 17 months ago
#56076 closed defect (bug) (duplicate)
Incorrect Status when deactivating a site on multisite.
Reported by: | richardkrone | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.0 |
Component: | Networks and Sites | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
Hello:
I noticed that when I create a new sub-site on the a multisite install and then “DEACTIVATE” that site, it indicates that the site is “DELETED” and not “DEACTIVATED.” This change of status is incorrect as the site has not been deleted.
The menu link below the site name does however change the work “deactivate” to “Activate”
Here is a screen capture of the area I am talking of https://ibb.co/pKCDr4N
My current install PHP 7.4.28 – WP 6.0
Thanks,
Richard
Attachments (1)
Change History (8)
#2
@
2 years ago
- Keywords has-patch added
I've added a simple patch to refer to site as Deactivated
rather than Deleted
in site list and edit site screens.
#3
@
20 months ago
I have just noticed that on the sites-info.php page there is a checkbox for "Deleted" when that too is really "Deactivated." This may be already part of the patch discussed. Thanks.
This ticket was mentioned in PR #4476 on WordPress/wordpress-develop by @ideag.
17 months ago
#4
This PR changes some of the strings, to consistently refer to sites in multisite as 'Deactivated' when they are marked as such. Previously there were cases where they were being called as 'Deleted', while there is a separate action to 'Delete' a site which actually fully removes the site from the system.
Trac ticket: https://core.trac.wordpress.org/ticket/56076
#5
@
17 months ago
I was browsing through older tickets and just noticed that this has been reported 12 years ago here: #15801. Not sure how to transfer the PR to the old ticket?
17 months ago
#6
Also related to Trac Ticket: https://core.trac.wordpress.org/ticket/15801
When one clicks the "Deactivate" link, two things actually happen in the code:
do_action( 'deactivate_blog', $id ); update_blog_status( $id, 'deleted', '1' );
So the blog is actually marked as
deleted
and thus displayed as such.When one clicks on the "Delete" link,
wpmu_delete_blog()
is called under the hood, and the site is fully deleted from the database and does not show up in the site list at all.I guess this falls under "naming things is hard" banner. Or, rather, under "re-naming things is even harder" banner. What used to be called 'Deleted' now is deactivated, but not all text strings have been updated. One part of this is updating the UI strings, which is easy enough, another part could be renaming the actual flag under the hood. That is a different can of worms and might not be worth the effort.
I'll try to create a patch for the first part next week.