Make WordPress Core

Opened 2 years ago

Closed 17 months ago

#56076 closed defect (bug) (duplicate)

Incorrect Status when deactivating a site on multisite.

Reported by: richardkrone's profile 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)

56076_-_Improve_consistency_in_UI_strings__Always_refer_to_site_as__Deactivated_,_n.patch (2.4 KB) - added by ideag 2 years ago.
simple patch to improve consistency in UI strings

Download all attachments as: .zip

Change History (8)

#1 @ideag
2 years ago

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.

@ideag
2 years ago

simple patch to improve consistency in UI strings

#2 @ideag
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 @richardkrone
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 @ideag
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?

@jorbin commented on PR #4476:


17 months ago
#6

Also related to Trac Ticket: https://core.trac.wordpress.org/ticket/15801

#7 @jorbin
17 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15801.

@ideag I edited the PR so that it is now on the other ticket. I'm going to close this as a duplicate since that ticket has a lot of discussion.

Note: See TracTickets for help on using tickets.