Earlier this week Matthias Pfefferle released an update of the Sempress theme I use as a basis for this site. I clicked install in my WordPress dashboard, and then my site became unreachable. I mentioned it in the IndieWeb IRC/Slack channel for WordPress and Matthias kindly offered help in figuring out the issue. He found a small mistake on his side, which he quickly corrected and updated, and he spotted a few differences between my child theme and his original. But it didn’t solve the issue. So I left my child theme turned off, and ran Sempress proper, with the idea I would make time to compare my child theme alterations with the original later in the week. Then I slept on it and the next morning I woke up with the notion that I had changed some function in the original Sempress theme, for my child theme to work.
That turned out to be the issue. I copied and tweaked a function, that then in the original Sempress file should be wrapped in a conditional statement that checks if that function isn’t already loaded (as the child theme gets loaded first, then the theme). When a function gets loaded twice it causes a clash. Precisely that function isn’t wrapped by default in a check if it already exists. So I added
if (!function_exists(sempress_customize_css)): and all was well again.
Unlike last time, this time I documented that I need to do this after an update of the Sempress theme. (Or suggest a change to the original.)