It's related to https://redmine.gc.cuny.edu/issues/18235#note-1 .
This is what the 'pre_update_option_template'
logger caught for that site:
[09-Dec-2024 15:32:01] twentytwelve switched to twentytwenty for site ID 36222: 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}
[09-Dec-2024 15:39:42] twentytwenty switched to raft for site ID 36222: switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
[18-Dec-2024 13:43:20] raft switched to twentyseventeen for site ID 36222: do_action('wp_ajax_customize_save'),
WP_Hook->do_action,
WP_Hook->apply_filters,
WP_Customize_Manager->save,
WP_Customize_Manager->save_changeset_post,
switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
[18-Dec-2024 13:46:31] twentyseventeen switched to raft for site ID 36222: switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
[20-Dec-2024 04:32:42] raft switched to twentyseventeen for site ID 36222: switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
[20-Dec-2024 04:33:32] twentyseventeen switched to raft for site ID 36222: switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
[20-Dec-2024 04:36:21] raft switched to academica for site ID 36222: do_action('wp_ajax_customize_save'),
WP_Hook->do_action,
WP_Hook->apply_filters,
WP_Customize_Manager->save,
WP_Customize_Manager->save_changeset_post,
switch_theme,
update_option,
apply_filters('pre_update_option_template'),
WP_Hook->apply_filters,
{closure}
Boone, I'm guessing that the last change in the logger is due to you flushing the cache, which triggered the change to the correct 'academica'
template. However 'academica'
doesn't even show up before the last log entry, which means that update_option( 'template' )
in switch_theme()
is being bypassed entirely: https://github.com/WordPress/WordPress/blob/fe1018b90d9fd4d6710bfd0baed4a443092c4654/wp-includes/theme.php#L805. Is 'pre_update_option_template'
too late of a filter to hook in for logging? I think it should be correct in the switch_theme()
firing sequence.