-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Jetpack Plugins: Use real-time Manage module activation status #12715
Conversation
There's still some weird state if you do the following
|
Two other observations:
While working on this, I came up with this proposed refactor to rearrange a little bit how we react to a loading state. Maybe it comes in handy as reference for this PR. |
@oskosk thanks for the review, good catches there! I've addressed your observations, could you have another look? |
Instead of relying on fetching the active modules data could we used the current active modules that we get from |
@enejb, the code originally uses the data coming from The data there reflected that .com was not aware of some of the actions while we were trying to activate/deactivate some modules frequently. A few hours ago, @lezama addressed this issue in .com, so it's likely that this PR will be updated to reflect that. More context about the fix is provided in p7rcWF-l0-p2. |
This PR is no longer necessary, the fix that was described in p7rcWF-l0-p2 addresses it. Closing. |
This PR fixes #8404, where Manage module is incorrectly being considered deactivated in certain cases. The PR suggests using the real-time activation status of the Manage module instead of the one we have from the latest sync.
This will require some more testing (cc @lancewillett), as the issue was difficult to reproduce in the first place. I was lucky to reproduce it today, which helped in fixing it.
It's worth to mention that the plugins main component requires some refactor in order to approach this issue the best way (e.g. avoid repetition of rendering the
QueryJetpackModules
query component), but let's leave that for another PR, and get this long-standing issue fixed.To test:
$site
is a Jetpack site, and$plugin
is a plugin of your choice that's active on that site./plugins/$site
./plugins/$site
./plugin/$plugin/$site
./plugins/$plugin/$site
.