Jetpack: Subscriptions: deactivating module unsets Follow email option

Created on 7 Jan 2020  路  3Comments  路  Source: Automattic/jetpack

Steps to reproduce the issue

  1. Start from a brand new Jetpack site, with the Subscriptions module on.
  2. Go to Settings > Discussion
  3. You'll notice that "email me whenever someone follows my blog" is on.
  4. Go to Jetpack > Settings > Discussion and deactivate the Subscriptions module.
  5. Once you've received confirmation, reactivate it.
  6. Go to Settings > Discussion
  7. You'll notice that "email me whenever someone follows my blog" is now off.

Ideally the option would remain when you deactivate / reactivate the module.

Reported in p8oabR-sb-p2#comment-3759

Subscriptions [Pri] Normal [Type] Bug

All 3 comments

@jeherve this is introduced in this PR and this specific code:

  • (1) When "Subscriptions" module is activated, the option is set "off".
  • (2) When it is deactivated, the option will be removed.

https://github.com/Automattic/jetpack/pull/14239/files#diff-6e4337c8315c90dd70aea03475af1dc1R867-R888

To fix this issue, we just need to remove (2) and change (1)'s behavior to:

  • The option is set "off" if the option does not exist.
  • Otherwise, do nothing.

I can create a PR. Do you think it's good enough to merge in 8.1 or still need to wait till 8.2?

Do you think it's good enough to merge in 8.1 or still need to wait till 8.2?

Let's schedule this for 8.2. 馃憤

I followed up a similar option Someone likes one of my posts from "Likes" module
https://github.com/Automattic/jetpack/blob/8.0/modules/likes.php#L98-L118

I thought it's kinda a standard in handling options in Jetpack. And it also makes sense when deactivating a module, we should clear all of its settings.

Was this page helpful?
0 / 5 - 0 ratings