Skip to content
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

REST API: Cannot activate some Settings ("The requested Jetpack module is not supported by your plan.") #9033

Closed
ockham opened this issue Mar 12, 2018 · 8 comments
Labels
Plans [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Milestone

Comments

@ockham
Copy link
Contributor

ockham commented Mar 12, 2018

Steps to reproduce the issue

What I expected

The 'Enable SEO tools...' toggle to flip to active.

What happened instead

  • Got a 'There was a problem saving your changes. Please try again.' notice.
  • Network Response:
{"code":424,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"not_supported","message":"The requested Jetpack module is not supported by your plan."}}

I also tried the same for Search ('Replace WordPress built-in search with an improved search experience') -- same error.

/cc @tyxla

@ockham ockham added [Type] Bug When a feature is broken and / or not performing as intended [Feature] WP REST API and removed [Feature] WP REST API labels Mar 12, 2018
@tyxla tyxla added this to the 6.0 milestone Mar 12, 2018
@tyxla
Copy link
Member

tyxla commented Mar 12, 2018

I'm able to reproduce with a fresh and non-fresh site too. Seems like something is wrong with how we recognize plans?

@jeherve
Copy link
Member

jeherve commented Mar 12, 2018

cc @gravityrail who worked on this in #8983

@gravityrail
Copy link
Contributor

I'll take a look at this today, thanks for the heads-up.

@gravityrail
Copy link
Contributor

gravityrail commented Mar 12, 2018

I have not been able to reproduce this issue no matter how many times I try @ockham, @tyxla and @jeherve.

I will test again once bleeding edge Jetpack Beta is broken, but in the meantime I am not 100% sure there is still a bug here.

My guess is that it's something to do with the caching of module headers in the options table. I will open a PR to clear that cache on upgrade for 6.0, I bet that eliminates it.

@gravityrail
Copy link
Contributor

Oh you know what - the cache key for file data includes JETPACK__VERSION, so I don't think stale caches will be an issue on true version upgrade, just while we're testing in the beta.

In the meantime, assuming your transients are stored in MySQL, you can delete all transients from your DB and test again using:

$ wp shell
wp> global $wpdb;
wp> $wpdb->query( "DELETE FROM $wpdb->options WHERE `option_name` LIKE ('_transient_%');" );
wp> $wpdb->query( "DELETE FROM `wp_options` WHERE `option_name` LIKE ('_site_transient_%');" );

@gravityrail gravityrail added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Mar 12, 2018
@ockham
Copy link
Contributor Author

ockham commented Mar 12, 2018

Deleting transients fixes the issue!

I've played some more with this. I think I've found the following pattern: The issue seems to be specifically happening (always with a fresh JN site using the latest JP beta):

  • When starting with a Premium plan and trying to activate SEO.
  • When starting with a Premium plan, then updating to Pro, trying both SEO and Search.

Things work fine when starting with a Pro plan right away.

@ockham ockham removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Mar 12, 2018
@tyxla
Copy link
Member

tyxla commented Mar 13, 2018

@gravityrail I confirm that deleting transients fixes the issue. Please, let me know if you need anything else - testing or whatever I could be of help with. Thanks!

Side note: for deleting the transients I find this command a simpler way to delete all transients:

wp transient delete --all

@gravityrail
Copy link
Contributor

This is so so silly of me... I just forgot to add seo-tools to the Premium plan in the plugin header information. Creating a PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plans [Pri] BLOCKER [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

4 participants