-
Notifications
You must be signed in to change notification settings - Fork 25
Only one of the three network site-status filters is reachable #398
Copy link
Copy link
Closed
Labels
Good First IssueIssue particularly suitable to be worked on by new contributorsIssue particularly suitable to be worked on by new contributors[Area] MultisiteNetwork-wide presence, aggregation, and Network Admin surfacesNetwork-wide presence, aggregation, and Network Admin surfaces[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featurephpPull requests that update php codePull requests that update php code
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Good First IssueIssue particularly suitable to be worked on by new contributorsIssue particularly suitable to be worked on by new contributors[Area] MultisiteNetwork-wide presence, aggregation, and Network Admin surfacesNetwork-wide presence, aggregation, and Network Admin surfaces[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing featurephpPull requests that update php codePull requests that update php code
The network read path filters archived, spam, and deleted sites at three
get_sites()calls. Onlywp_presence_compute_network_snapshot()is positioned to drop anything, because the other two read its output.wp_presence_hydrate_network_snapshot()has one caller (network-functions.php:535), and thesites-by-userindex is built at:409. Both take compute's return value, and thepresence_networkcache group is non-persistent, so a snapshot cannot outlive the request that built it.The
is_array()guards alongside them are likewise unreachable:get_sites()returns an array unless'count' => trueis passed, which nothing here does.Evidence
One edit each, then
WP_MULTISITE=1 ./vendor/bin/phpunit --group ms-required:Tasks
wp_presence_compute_network_snapshot()is_array()guardsLeave
uninstall.phpandwp_presence_get_network_site_ids()unfiltered by status. Both need to reach archived, spam, and deleted sites, or their presence tables are left behind.Follow-up to #351.
Use of AI Tools