We've had periodic reports of this, and I think I was able to reproduce it. It only happens when the option being changed is not yet in the DB. So for instance if the 'jetpack_search_show_powered_by' option is not yet in the DB, then we are unable to set the option to false because update_option() in Core checks to see what the current setting is with get_option(). get_option() returns false because it doesn't exist, and then update_option() doesn't think it has anything to do: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/option.php#L405
I guess we should be setting the value to '0' rather than false https://github.com/Automattic/jetpack/blob/aa1eedce7d7b90b5a943969e0b49ebdd9708f2f1/modules/search/class-jetpack-search-customize.php#L264
There have been a bunch of HE reports around this.
I'm able to reproduce this. Your explanation seems to be spot on.
I guess we should be setting the value to
'0'rather thanfalse(@gibrown)
Do you know where we're setting the value to false? I dug quite a bit into the Customizer code but was never able to find out where we serialize input values to be stored in the codebase.
Do you know where we're setting the value to false? I dug quite a bit into the Customizer code but was never able to find out where we serialize input values to be stored in the codebase.
I spent hours hunting around for this last week also. I think that by default it returns false. I can think of two solutions:
Most helpful comment
I spent hours hunting around for this last week also. I think that by default it returns false. I can think of two solutions: