Project

General

Profile

Bug #7688

Home theme deactivated

Added by Luke Waltzer about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority name:
Immediate
Assignee:
-
Category name:
-
Target version:
Start date:
2017-02-15
Due date:
% Done:

0%

Estimated time:

Description

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.

History

#1 Updated by Boone Gorges about 2 years ago

I've shut down the site in order to try to fix it. Please stand by.

#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.

#3 Updated by Luke Waltzer about 2 years ago

Thanks Boone!

Not sure if related but may be an additional data point: just before the clic above I had accepted a friend request, and the notification alert didn't clear when I did.

#4 Updated by Matt Gold about 2 years ago

Many, many thanks for your immediate work on this in the evening hours, Boone. You've saved us once again.

#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.

#6 Updated by Luke Waltzer about 2 years ago

Happy to confirm that I did, indeed, break the Commons!

#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....

#8 Updated by Matt Gold about 2 years ago

DON'T CLICK

#9 Updated by Boone Gorges about 2 years ago

The link is there, but if you clicked it, you'd be led to an error page. The plugin didn't remove the link itself, and I didn't feel like doing the extra work to do it myself.

#10 Updated by Luke Waltzer about 2 years ago

I figured, but wanted to confirm-- gratzi.

Also available in: Atom PDF