WordPress.org

Make WordPress Core

Opened 16 months ago

Closed 3 months ago

#49814 closed defect (bug) (fixed)

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

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

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 16 months ago.
ajax request 1
ajax_request_2.PNG (46.3 KB) - added by arena 16 months ago.
ajax request 2
49814.patch (2.0 KB) - added by Clorith 3 months ago.

Download all attachments as: .zip

Change History (7)

@arena
16 months ago

ajax request 1

@arena
16 months ago

ajax request 2

#1 @arena
16 months ago

Two requests also on a usual dashboard.

#2 @SergeyBiryukov
16 months ago

  • Component changed from General to Site Health
  • Focuses administration added

@Clorith
3 months ago

#3 @Clorith
3 months ago

  • Milestone changed from Awaiting Review to 5.8
  • Version set to 5.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
3 months ago

  • Owner set to Clorith
  • Resolution set to fixed
  • Status changed from new to closed

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.