Home theme deactivated
Somehow, the home theme reverted to twentytwelve. Happened when I accidentally clicked "customize" when I was trying to go into the dash-- didn't even open the customizer, just switched themes. Can't reactivate BP-Commons.
#2 Updated by Boone Gorges about 2 years ago
The site is back up and should be responding normally.
Something caused the Memcached cache to be massively corrupted, such that WordPress was successfully fetching cached values, but all the values were ending up as empty strings. This includes options like 'stylesheet' and 'template', which dictate the active theme. Since an empty string is not a valid value for most of these settings, WordPress was falling back on default settings and otherwise trying not to fail catastrophically.
Once I identified the Memcached cache as the problem, the fix was fairly straightforward: a hard flush (wp_cache_flush()).
I don't have any good way to figure out how the cache got corrupted. Luke mentions that it happened when he clicked into the Customizer on the main site. Tomorrow, I will do some tests locally and in cdev to see if I can reproduce this. I'll also check with Lihua to see if there was a system-level Memcached issue. If this were the case, it'd generally mean that Memcached simply goes away, resulting in a site that is non-corrupt but loads extremely slowly. For this reason, I doubt it's a server-level issue, but it doesn't hurt to check.
I'll leave this ticket open while I'm investigating.
#5 Updated by Boone Gorges about 2 years ago
- Status changed from New to Resolved
- Target version set to Not tracked
I was able to narrow down the problem to some combination of the bp-nelo theme, the Post Gallery widget (powering our hero slider), and the Customizer. Activating the Customizer when running this combination results in some sort of cascading failure, which causes WP to fall back on the default theme (Twenty Twelve, in our case). I didn't narrow it down any further than that. The cache corruption is likely just a side effect that makes the problem worse: the Customizer is partly loading, which involves "faking" some site settings in order to create a sandbox for previewing site modifications. But when the emergency theme switch takes place, it leaves the cache in a suspended state. This seems to me like it may be a WordPress bug, but it's more than I'm able to debug further at the moment.
To avoid future instances of this problem on the Commons, I've added a plugin that completely disables the Customizer, and I've activated it on the main site. (It's not visible to other members of the Commons.) https://github.com/cuny-academic-commons/cac/commit/2de6f22bfc4463301cb98e15b0da1e1f8c66d859
If we decide that we need to support the Customizer at some point in the future - highly unlikely with this version of our theme, I think - then we can do a deeper dive.
#7 Updated by Luke Waltzer about 2 years ago
@Boone-- just a note that I'm still seeing the Customizer (not sure if deactivation still leaves the Menu there and eliminates the link, so thought I'd ask). Screenshot attached....