site-kit-wp: Transliterator plugin causes `t.every is not a function` error because it modifies Site Kit WP-REST API responses
Bug Description
There have been 2 reports in the support forums of the below error:
t.every is not a function
This have occurred since Site Kit 1.122.0
t.every is not a function</p> <pre class=”wp-block-code”><code>in WidgetNull in WithWidgetSlug(WidgetNull) in WhenAdsenseActive(ModuleOverviewWidget) in div in WidgetRenderer in div in WidgetCellWrapper in div in Row in div in div in Grid in WidgetAreaRenderer in div in WidgetContextRenderer in DashboardMainApp in DashboardEntryPoint in RestoreSnapshots in ErrorHandler in ThemeProvider in StrictMode in Root
Reports of this in the support forums below:
- https://wordpress.org/support/topic/issue-after-update-version-1-122-0/ | No SH info
- https://wordpress.org/support/topic/site-kit-encountered-an-error-121/ | No SH info
As discovered by @benbowler, this is caused by the Transliterator plugin, which seems to be modifying our WP REST API JSON responses.
Steps to reproduce
- Set up Site Kit, including Analytics (preferably on a site with Analytics data).
- Install the Transliterator plugin
- Ensure your
sessionStorageandlocalStoragecaches are cleared by runningsessionStorage.clear()andlocalStorage.clear() - Visit the Site Kit dashboard
- Error should appear
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- If the Transliterator plugin is detected, a “Subtle notification” (with warning colours/styles) should appear warning the user that the Transliterator plugin can cause errors for Site Kit and should be disabled until a fix exists.
- A variant of the “Subtle Notification” we use (https://github.com/google/site-kit-wp/blob/ebed6cd857abf9fe3557fae0057683214dddd5ba/assets/js/components/notifications/SubtleNotifications.js#L35) should be created with warning colours and icons, matching existing warning components elsewhere in the plugin (eg similar to the styles used in https://github.com/google/site-kit-wp/blob/ebed6cd857abf9fe3557fae0057683214dddd5ba/assets/js/components/WarningNotice.js#L25)
Implementation Brief
Test Coverage
QA Brief
Changelog entry
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 25 (3 by maintainers)
Thanks a lot for this, I will look into this problem and fix it. We just released a new version of the plugin a week ago, we finally switched from that mutant to a completely new code. I will fix the problems and solve. Thanks again!
Closing this issue out since it’s already gone through the full cycle and the changes have already been reverted. @tofumatt please open a new issue for any follow-up here as we’re essentially starting fresh.
I created a topic here on the Transliterator plugin support page.