Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#52483 closed defect (bug) (fixed)

Site Health breaks when heartbeat deregistered

Reported by: gmariani405 Owned by: peterwilsoncc
Priority: normal Milestone: 5.7
Component: Site Health Version: 5.6.1
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Site Health fails to complete if a plugin de-registers the heartbeat script which Site Health relies on to include wp-hooks. This occurs if you use a plugin to manage when heartbeat runs and how often.

I'd suggest listing wp-hooks as a dependency for Site Health instead of relying on heartbeat to include it.

This is the error generated on the Site Health page when heartbeat is de-registered:

11:36:24.820 TypeError: wp.hooks is undefined site-health.min.js:2:3983
    t https://example.com/wp-admin/js/site-health.min.js:2
    jQuery 4

Attachments (2)

screenshot.png (98.7 KB ) - added by gmariani405 5 years ago.
Screenshot of error on Site Health page
52483.diff (958 bytes ) - added by mukesh27 5 years ago.
Updated patch.

Download all attachments as: .zip

Change History (9)

@gmariani405
5 years ago

Screenshot of error on Site Health page

This ticket was mentioned in PR #989 on WordPress/wordpress-develop by Clorith.


5 years ago
#1

  • Keywords has-patch added

#2 @Clorith
5 years ago

  • Keywords commit added
  • Milestone Awaiting Review5.7

Good catch! Yes Site Health should be declaring that dependency explicitly as you mentioned. See PR 989 which adds the dependency.

Milestoning this for 5.7, as it's a bug with a clear solution, and the solution provides no side-effects.

#3 @peterwilsoncc
5 years ago

  • Keywords needs-refresh added; commit removed

@Clorith wp-i18n is also missing as a direct dependency of the site-health JavaScript. It would be dandy to include that while making the change.

I did a quick search through the file for window. and wp. and I think once i18n is included everything will be good to go.

@mukesh27
5 years ago

Updated patch.

#4 @mukesh27
5 years ago

  • Keywords needs-refresh removed

52483.diff updated patch.

#5 @Clorith
5 years ago

Ahh, good catch, I was incidentally running the plugin version, which doesn't ahve the same dependencies (working on fixing that :) )

52483.diff looks good to go then.

#6 @peterwilsoncc
5 years ago

  • Owner set to peterwilsoncc
  • Resolutionfixed
  • Status newclosed

In 50294:

Site Health: Update site-health script dependencies.

Add wp-hooks and wp-i18n to Site Health JavaScript dependencies.

Props gmariani405, Clorith, mukesh27.
Fixes #52483.

Clorith commented on PR #989:


5 years ago
#7

Fixed in trunk.

Note: See TracTickets for help on using tickets.