Opened 4 years ago
Closed 4 years ago
#52203 closed defect (bug) (duplicate)
Healthcheck fails for blogs other than main blog in multisite
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.6 |
Component: | Site Health | Keywords: | |
Focuses: | administration, multisite | Cc: |
Description
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 onwp_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.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac!
Thanks for the report, we're already tracking this issue in #52135.