Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#49814 closed defect (bug) (fixed)

health-check-site-status-result ajax requestS on dashboard

Reported by: arena Owned by: Clorith
Priority: normal Milestone: 5.8
Component: Site Health Version: 5.4
Severity: normal Keywords:
Cc: Focuses: administration

Description

Hello,

On an empty dashboard, with all widgets removed :

action : health-check-site-status-result => two ajax requests ?

Should this javascript be activated ONLY if the widget is available ?

Any documentation online on those "counts" and what they are counting ?

Regards

Attachments (3)

ajax_request_1.PNG (44.0 KB ) - added by arena 6 years ago.
ajax request 1
ajax_request_2.PNG (46.3 KB ) - added by arena 6 years ago.
ajax request 2
49814.patch (2.0 KB ) - added by Clorith 5 years ago.

Download all attachments as: .zip

Change History (7)

@arena
6 years ago

ajax request 1

@arena
6 years ago

ajax request 2

#1 @arena
6 years ago

Two requests also on a usual dashboard.

#2 @SergeyBiryukov
6 years ago

  • Component GeneralSite Health
  • Focuses administration added

@Clorith
5 years ago

#3 @Clorith
5 years ago

  • Milestone Awaiting Review5.8
  • Version5.4

Thank you very much for your report here.

You are quite right, it actually shouldn't be triggering any ajax calls at all, as they are intended to save the results of a Site Health check when visiting the Site Health page it self.

49814.patch adds some new conditional checks to the JavaScript file, making sure the relevant pieces of code only run on the appropriate Site Health related pages.

#4 @Clorith
5 years ago

  • Owner set to Clorith
  • Resolutionfixed
  • Status newclosed

In 50766:

Site Health: Remove Ajax requests from dashboard widget.

The Site Health dashboard widget uses the same JavaScript file as the Site Health pages to generate its progress indicator.

This file was also set up to store the current Site Health check results if the current tab being shown isn't the debug information one, this had the side effect of the dashboard being seen as not the debug screen as well.

This now has a conditional making sure it's the status screen it self being displayed, before trying to do any Ajax requests.

Props arena.
Fixes #49814.

Note: See TracTickets for help on using tickets.