Closed kraftbj closed 1 year ago
I'm seeing this on various sites in a production Multisite too, so there may be additional causes beyond offline mode. I'll wait and see if installing v11.4
fixes it, though 👍🏻
E_ERROR: Uncaught Error: Class 'Jetpack_Subscriptions_Widget' not found in /wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/subscribers.php:67
URL: https://kolkata.wordcamp.org/2022/wp-json/wpcom/v2/subscribers/count?_locale=user
Referer: https://kolkata.wordcamp.org/2022/wp-admin/post.php?post=653&action=edit&classic-editor__forget
Reopening as we've run into this on a Team51 site.
In our case the site has a Subscription block in the Footer widget area. The site was cloned, and the clone had a Site connection but no Account connection. Without the Account connection we get the fatal. Removing the Subscription block or creating the Account connection resolves the fatal, but I'd expected it to fail gracefully.
I can reliably replicate on a Jurassic Ninja site as well. If I setup the Jetpack connection (Site and Account), add a subscribe block in a widget and then break the Account connection I get the fatal:
Fatal error: Uncaught Error: Class "Jetpack_Subscriptions_Widget" not found in /srv/users/usere8d75201/apps/usere8d75201/public/wp-content/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php:451
@katiebethbrown Good catch, thanks a lot for the reproduction steps! I opened #31635 to take care of that.
Impacted plugin
Jetpack
Steps to Reproduce
A clear and concise description of what you expected to happen.
No fatals.
What actually happened
Browser
No response
Other information
My guess is something with Developer mode disabling the subscriptions module, but either a block always expects it or doesn't realize it won't ba available, and the rest endpoint class doesn't sufficiently ensure the class is available before trying to use it.
Platform (Simple, Atomic, or both?)
No response
Reproducibility
Consistent
Severity
One
Available workarounds?
No response
Workaround details
No response