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

Created on 12 Mar 2018  路  8Comments  路  Source: Automattic/jetpack

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

Plans [Pri] BLOCKER [Type] Bug

Most helpful comment

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

All 8 comments

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

cc @gravityrail who worked on this in #8983

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

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.

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_%');" );

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.

@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

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.

Was this page helpful?
0 / 5 - 0 ratings