question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dashboard notices not appearing on the Site Kit dashboard header, yet appearing elsewhere on wp-admin

See original GitHub issue

Bug Description

Not all toolbar notices are appearing within the Site Kit dashboards, yet they are elsewhere.

Example below of a non Site Kit admin tab - the notice appears:

image

Example below of a Site Kit admin tab - the error doesn’t appear. There is a console error that appears relating to the head error that should appear.

image

Video below of experience below

https://user-images.githubusercontent.com/41326532/160675609-77498c54-1152-489c-b80d-31b0e9b75eca.mp4

Steps to reproduce

  1. Set up Site Kit
  2. Open a new tab and navigate to the Site Kit dashboard
  3. Click on your user profile icon in the header and select “Manage Sites” from the dropdown
  4. Click the button to “Remove access” for the site you are using
  5. Close the browser tab - do not click “Back” to go back to your site as this will trigger a disconnect
  6. Wait 1 hour for the cached content to expire
  7. Revisit your Site Kit dashboard

Additional Context

  • Site Kit 1.70.0
  • This is occurring on a site which has the Unified Dashboard feature enabled.

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Site Kit should display the proper auth error on its dashboard when an authentication error is present such as when a new token is unable to be received due to missing delegation consent

Implementation Brief

  • Update a reference to credentials to be via Authentication rather than as a member property (this is currently raising a fatal which is returning a different error rather than the expected auth error which is why it isn’t showing up as expected)
  • Merge #5024

Test Coverage

  • Extend coverage for Module::exception_to_error to include a case for handling a Google_Proxy_Code_Exception

QA Brief

  • Follow steps for reproducing the issue
  • See banner notification and report error in widgets as shown above rather than “invalid JSON error”

Changelog entry

  • Ensure WordPress dashboard notices appear in Site Kit.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
aaemnnosttvcommented, Apr 1, 2022

Thanks @jamesozzie – I confirmed this earlier and put together a fix that should go out in the next release 👍

1reaction
aaemnnosttvcommented, Apr 6, 2022

@wpdarren this looks correct to me. The important difference here is the error shown in the component, as shown above – it mentions an error on the Google service and includes the link to “redo the plugin setup”. Before this change, it was a generic critical error from WP as shown in the description because something was broken internally.

Your observation about the loading state is a valid, but this is what will be fixed in https://github.com/google/site-kit-wp/issues/4542

So I agree it doesn’t look entirely right yet, but for the purpose of this issue, everything looks as expected so far unless there’s anything else?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dashboard Site kit not showing | WordPress.org
Got the same issue on my website. The Site Kit doesn't loaded on Dashboard. I already reset it. I deactivate also WP Rocket....
Read more >
Dashboard - Site Kit by Google
This error can appear on the Site Kit dashboard due to plugin conflicts or particular Content-Security-Policy (CSP) rules. You will encounter this error...
Read more >
Display Messages in the Dashboard with Admin Notices
To display an admin notice, we're going to write one function, and it can be placed just about anywhere. If ...
Read more >
Wordpress Admin Bar Not Showing on frontend of site
It shows when I'm logged in at the backend i.e Dashboard though. User settings are ok (set to show admin bar when viewing...
Read more >
Branda WordPress White Label Plugin Usage Documentation
The Branda Dashboard allows you to access every module from one screen. ... such as My Sites, Comments, Updates, etc., will not display...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found