[wp-trac] [WordPress Trac] #52203: Healthcheck fails for blogs other than main blog in multisite
WordPress Trac
noreply at wordpress.org
Sat Jan 2 16:15:50 UTC 2021
#52203: Healthcheck fails for blogs other than main blog in multisite
---------------------------------------+-----------------------------
Reporter: sunpig | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 5.6
Severity: normal | Keywords:
Focuses: administration, multisite |
---------------------------------------+-----------------------------
I've got a multi-site installation using version 5.6, with 5 blogs in it.
Running the healthcheck on the dashboard in each of them gives varying
results:
* On the main blog, the healthcheck is clean - no problems reported
* On the four non-main blogs, the healthcheck reports a problem with
background updates: "A plugin has prevented updates by disabling
wp_version_check()."
In my case, there are no plugins that do anything to change the default
version checking behaviour. I traced through the code and found a
different underlying cause:
* The healthcheck function `test_wp_version_check_attached` checks for the
presence of a filter on `wp_version_check` (class-wp-site-health-auto-
updates.php)
* Only the **main** blog has a filter attached for `wp_version_check`.
It's added right at the end of update.php - but only for the main blog and
network admin.
* Without the filter attached, this specific healthcheck test will fail
for all non-main blogs.
Suggestions:
* If the version check is only performed on the main blog in a multi-site
installation, modify the healthcheck test to see if it's being performed
on the main blog, or on a secondary one.
* Change the error message text depending on whether the healthcheck is on
the main blog or not. The existing error text, ''"A plugin has prevented
updates..."'' can be misleading if you're looking at the healthcheck for a
secondary blog - it makes it look like something's wrong, when everything
might be working as expected.
Best regards,
-Martin.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52203>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list