site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Consent Mode related console error on View only Dashboard

Open wpdarren opened this issue 1 year ago • 2 comments

Bug Description

While testing Dashboard Sharing, I encountered a console error message on the view only, main and entity dashboard. Google Site Kit API Error method:GET datapoint:consent-mode type:core identifier:site error:"Sorry, you are not allowed to do that." Chatting to @techanvil on Slack and he confirmed that we should avoid making the call on the view-only dashboard for the new Consent Mode CTA banner notification.

Screenshots

image.png

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

Acceptance criteria

  • Consent mode API (GET:consent-mode) should not be called in shared dashboard, thus preventing any permission related console errors.

Implementation Brief

  • [ ] Do not render <ConsentModeSetupCTAWidget that calls the aforementioned API in DashboardMainApp and DashboardEntityApp in view-only dashboard. ie. { ! viewOnlyDashboard && <ConsentModeSetupCTAWidget /> }

Test Coverage

  • No changes needed.

QA Brief

Changelog entry

wpdarren avatar Mar 18 '24 11:03 wpdarren

I've been able to reproduce this easily on shared dashboard. Moving forward straight to IBR. :tada:

kuasha420 avatar Mar 24 '24 13:03 kuasha420

IB ✔️

eugene-manuilov avatar Mar 26 '24 13:03 eugene-manuilov

QA Update: ✅

Verified:

  • On the Network tab no calls were made to the GET:consent-mode API.
  • Ensured that no network error occurs for the above API endpoint.
  • Verified the above in the Main and the Entity dashboard.
  • No console errors occured as per ticket description.

image image

wpdarren avatar Apr 09 '24 16:04 wpdarren