-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stats: Fix enable stats module flow #16873
Conversation
This fixes a bug where self-hosted sites that weren’t connected to Jetpack weren’t able to enter the Jetpack Install/Connect flow.
You can trigger an installable build for these changes by visiting CircleCI here. |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
@thehenrybyrd thank you for spotting this, and @ScoutHarris thanks for the ping! @mokagio Just a heads up about this PR, it might be good to release a new beta once this PR lands since this also fixes a Stats related bug. Sorry for this bug! 🙇♀️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@momo-ozawa just noticed you're targeting |
@momo-ozawa this has been bundled as part of 17.8 beta 2 (17.8.0.2). Thanks for your work 🙌 |
Fixes #16867
Description
This fixes a bug introduced in #16822, where self-hosted sites not connected to Jetpack weren’t able to enter the Jetpack Install / Connect flow.
What caused the bug / How I fixed it
I was checking if the stats module was disabled in the wrong place. As a result, self-hosted sites that weren't yet connected to Jetpack would only see the Enable Site Stats screen and never have a chance to go through the Jetpack Install / Connect flow.
To fix this, I'm now checking if the stats module is disabled if and only if we know the site is connected to Jetpack (i.e. the blog object has an account associated with it).
How to test
Regression Notes
Potential unintended areas of impact
Jetpack Install / Enable stats module flows
What I did to test those areas of impact (or what existing automated tests I relied on)
Tested the above steps
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.