You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #9083 we updated the periodic connection check Site Kit performs which tests for internet connectivity by pinging our REST index endpoint. There is still the potential for inaccurate behavior in the event that the request fails – this happened for me recently when my session timed out and the request failed due to a bad REST nonce. Such a failure is irrelevant to this check though which is only concerned with the request connecting to the backend successfully, rather than authenticating, etc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The internet connectivity check should only trigger the offline notification if the backend is unreachable
Implementation Brief
Update the fetch made to use fetch rather than apiFetch (adapting as necessary) and remove checks on its response (if the call does not throw, consider online=true, otherwise catch and set false
Feature Description
In #9083 we updated the periodic connection check Site Kit performs which tests for internet connectivity by pinging our REST index endpoint. There is still the potential for inaccurate behavior in the event that the request fails – this happened for me recently when my session timed out and the request failed due to a bad REST nonce. Such a failure is irrelevant to this check though which is only concerned with the request connecting to the backend successfully, rather than authenticating, etc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
fetch
rather thanapiFetch
(adapting as necessary) and remove checks on its response (if the call does not throw, consideronline=true
, otherwise catch and setfalse
site-kit-wp/assets/js/hooks/useMonitorInternetConnection.js
Lines 55 to 67 in 3a6fd17
Test Coverage
QA Brief
Go to Site Kit dashboard. Disconnect from the internet connection on your system.
Notice that the offline notice should appear.
Re-connect to internet and warning should go away. Make sure that request was intercepted by tweak.
Changelog entry
The text was updated successfully, but these errors were encountered: