This is a long-occurring bug. See https://redmine.gc.cuny.edu/issues/18235#note-1, #19083.
Unfortunately, I haven't nailed down what is causing this. My theme option logger did not catch the blackfeminisms
'template'
change. Here's what I'm using for the logger:
add_filter( 'pre_update_option_template', function( $retval, $old_value, $option ) {
if ( $retval !== $old_value ) {
ray_log( $old_value . ' switched to ' . $retval . ' for site ID ' . get_current_blog_id() . ': ' . wp_debug_backtrace_summary() );
}
return $retval;
}, 10, 3) ;
My logger did catch the blog ID following blackfeminisms
:
[04-Jun-2024 16:13:39] twentytwelve switched to ashe for site ID 34485: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/bp-nelo/buddypress.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, bp_replace_the_content, apply_filters('bp_replace_the_content'), WP_Hook->apply_filters, BP_Blogs_Theme_Compat->create_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require('/themes/bp-nelo/blogs/create.php'), cac_show_blog_signup_form, cac_blogs_validate_blog_signup, wpmu_create_blog, wp_insert_site, do_action_deprecated, do_action_ref_array('wpmu_new_blog'), WP_Hook->do_action, WP_Hook->apply_filters, CAC\SiteTemplates\Frontend::process_site_template, CAC\SiteTemplates\Template\Template->clone_to_site, CAC\SiteTemplates\Template\Cloner->go, CAC\SiteTemplates\Template\Cloner->migrate_site_settings, update_option, apply_filters('pre_update_option_template'), WP_Hook->apply_filters, {closure}
And that site appears to work fine.
Also, the Cavalcade thing I mention in the previous tickets doesn't seem to be related to this specific instance. All signs point to something during the site creation process, but I'm not sure what is causing it. Could be cache-related, but it doesn't explain how it is triggered during other user's site creations.